PHP code example of andrey-helldar / extended-routes

1. Go to this page and download the library: Download andrey-helldar/extended-routes 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/ */

    

andrey-helldar / extended-routes example snippets


use DragonCode\ExtendedRoutes\Routing\ModelBindingResolver;
use DragonCode\ExtendedRoutes\Traits\ExtendedSoftDeletes;

class Page extends Model
{
    use ExtendedSoftDeletes;
}

use DragonCode\ExtendedRoutes\Models\ExtendedSoftDeletes;
//use Illuminate\Database\Eloquent\SoftDeletes;

class Foo extends ExtendedSoftDeletes
{
    //use SoftDeletes; << need to remove conflicting trait.
}

app('router')->apiRestorableResource('foos', 'FoosController');

// or

Route::apiRestorableResource('foos', 'FoosController');

use App\Http\Controllers\FoosController;

app('router')->apiRestorableResource('foos', FoosController::class);

// or

Route::apiRestorableResource('foos', FoosController::class);