PHP code example of ajaycalicut17 / laravel-trash
1. Go to this page and download the library: Download ajaycalicut17/laravel-trash 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/ */
ajaycalicut17 / laravel-trash example snippets
php artisan migrate
php artisan vendor:publish --provider="Ajaycalicut17\LaravelTrash\LaravelTrashServiceProvider" --tag="config"
Trash::all();
Trash::with('trashable')->get();
Trash::first()->restoreFromTrash();
Trash::first()->deleteFromTrash();
Trash::emptyTrash();