PHP code example of felipedecampos / laravel-soft-archive
1. Go to this page and download the library: Download felipedecampos/laravel-soft-archive 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/ */
felipedecampos / laravel-soft-archive example snippets
class ArchivedModel extends Model
{
use SoftArchives;
}
ArchivedModel::withoutArchived()->find($id)->archive();
ArchivedModel::withArchived()->find($id)->unarchive();
bash
php artisan vendor:publish --provider="FelipeDeCampos\LaravelSoftArchive\Providers\ArchiveServiceProvider" --tag="config"