PHP code example of zacksmash / laravel-softdelete-routes

1. Go to this page and download the library: Download zacksmash/laravel-softdelete-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/ */

    

zacksmash / laravel-softdelete-routes example snippets


// routes/web.php

Route::resource('items', ItemController::class)
    ->softDeletes();

// Or individually, if you only need one
Route::resource('items', ItemController::class)
    ->withRestore()
    ->withErase()