PHP code example of mangodev / filament-revive

1. Go to this page and download the library: Download mangodev/filament-revive 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/ */

    

mangodev / filament-revive example snippets


use MangoDev\FilamentRevive\FilamentRevivePlugin;

$panel->plugins([
    FilamentRevivePlugin::make()
]);

use MangoDev\FilamentRevive\FilamentRevivePlugin;

$panel->plugins([
    FilamentRevivePlugin::make()
        ->authorize(auth()->user()->isAdmin()) // Accepts a boolean or Closure to control access
        ->navigationGroup('Settings') // Group the page under a custom sidebar section
        ->navigationIcon('heroicon-o-archive-box-arrow-down')
        ->activeNavigationIcon('heroicon-o-archive-box-arrow-down')
        ->navigationSort(1)
        ->navigationLabel('Custom Label')
        ->slug('custom-slug')
        ->modelsNamespace('App\\MyCoolApp\\Custom\\Models') // Default is App\\Models
]);

namespace App\MyCoolApp\Custom\Models;

use MangoDev\FilamentRevive\Traits\Recyclable;
use Vendor\Package\Models\Foo as BaseFoo;

class Foo extends BaseFoo
{
    use Recyclable;
}

use MangoDev\FilamentRevive\Concerns\Recyclable;

class Post extends Model
{
    use SoftDeletes;
    use Recyclable;
}

@livewire(\MangoDev\FilamentRevive\Tables\RecycleBin::class)
bash
php artisan vendor:publish --tag="filament-revive-migrations"
php artisan migrate
bash
php artisan filament-revive:discover-soft-deleted