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'),
]);
}