1. Go to this page and download the library: Download widiu7omo/filament-bandel 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/ */
widiu7omo / filament-bandel 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
->actions([
// ...rest,
\Widiu7omo\FilamentBandel\Actions\BanAction::make(),
\Widiu7omo\FilamentBandel\Actions\UnbanAction::make()
]);
}
public static function table(Table $table): Table
{
return $table
->prependBulkActions([
// ...rest
\Widiu7omo\FilamentBandel\Actions\BanBulkAction::make('banned_model'),
\Widiu7omo\FilamentBandel\Actions\UnbanBulkAction::make('unbanned_model'),
]);
}