PHP code example of ttungbmt / filament-ban

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

    

ttungbmt / filament-ban example snippets


use Cog\Contracts\Ban\Bannable as BannableContract;
use Cog\Laravel\Ban\Traits\Bannable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable implements BannableContract
{
    use Bannable;
}

    public static function table(Table $table): Table
    {
        return $table
            ->prependBulkActions([
                \FilamentPro\FilamentBan\Actions\Ban::make('ban'),
                \FilamentPro\FilamentBan\Actions\Unban::make('unban'),
            ]);
    }
bash
php artisan vendor:publish --tag="filament-ban-migrations"
php artisan migrate
bash

php artisan vendor:publish --tag="filament-ban-config"