1. Go to this page and download the library: Download mpociot/reanimate library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mpociot / reanimate example snippets
"mpociot/reanimate": "1.*",
public function delete( User $user )
{
$user->delete();
return Redirect::route( "userIndex" )->with( "message", "userDeleted" );
}
public function delete( User $user )
{
$user->delete();
return Redirect::route( "userIndex" )->with( "message", "userDeleted" )->with( $this->undoFlash( $user ) );
}
namespace App\Http\Controllers;
class UserController extends Controller {
use \Mpociot\Reanimate\ReanimateModels;
public function myCustomUndoMethod( $primaryKey )
{
return $this->restoreModel( $primaryKey , new User(), "myCustomIndexRoute" );
}
}
php composer.phar update
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.