Ban plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Ban

Community

Ban and unban any Eloquent model directly from your Filament panel. This package wraps cybercog/laravel-ban and ships ready-to-use actions, bulk actions, an icon column and a status filter for your Filament resources and tables. Inspired by cybercog/laravel-nova-ban.

Tags: Action
Supported versions:
5.x 4.x 3.x
Jefferson Gonçalves avatar Author: Jefferson Gonçalves

Package health

Beta

Automated checks of this plugin's Composer package

94 / 100
Security 89
Maintenance 100
Ecosystem 100
15 checks
  • Passed: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Passed: Dependabot or Renovate configured
  • Failed: Dependency update cooldown configured No cooldown configured in .github/dependabot.yml. View details on Plumb
  • Passed: Provides a security policy
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
  • Passed: composer.lock not committed by library composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.2 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 7 hours ago

Documentation

Version:

Filament Ban

Buy Me A Coffee

Latest Version on Packagist GitHub Code Style Action Status Total Downloads License

Ban and unban any Eloquent model directly from your Filament panel. This package wraps cybercog/laravel-ban and ships ready-to-use actions, bulk actions, an icon column and a status filter for your Filament resources and tables. Inspired by cybercog/laravel-nova-ban.

#Version Compatibility

Filament Laravel PHP Branch Version
v3 10 / 11 8.1+ 1.x ^1.0
v4 11 / 12 8.2+ 2.x ^2.0
v5 11.28 / 12 / 13 8.2+ 3.x ^3.0

All tags use plain SemVer without the v prefix (e.g. 3.0.0).

#Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-ban

Publish and run the cybercog/laravel-ban migration (creates the bans table):

php artisan vendor:publish --provider="Cog\Laravel\Ban\Providers\BanServiceProvider" --tag="migrations"
php artisan migrate

Then add a nullable banned_at timestamp column to each bannable model's table:

Schema::table('users', function (Blueprint $table) {
    $table->timestamp('banned_at')->nullable();
});

#Preparing your model

Make any Eloquent model bannable by implementing the contract and using the trait:

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;
}

#Usage

#Actions

Add ban / unban buttons to a resource table row. Each action shows only when relevant (Ban when the record is not banned, Unban when it is). BanAction opens a modal where you can set an optional comment and an optional expiration date.

use JeffersonGoncalves\Filament\Ban\Actions\BanAction;
use JeffersonGoncalves\Filament\Ban\Actions\UnbanAction;

public function table(Table $table): Table
{
    return $table
        ->recordActions([
            BanAction::make(),
            UnbanAction::make(),
        ]);
}

#Bulk actions

use JeffersonGoncalves\Filament\Ban\Actions\BanBulkAction;
use JeffersonGoncalves\Filament\Ban\Actions\UnbanBulkAction;

$table->toolbarActions([
    BanBulkAction::make(),
    UnbanBulkAction::make(),
]);

#Column

Display the current ban status as a boolean icon:

use JeffersonGoncalves\Filament\Ban\Tables\Columns\BanColumn;

$table->columns([
    BanColumn::make(),
]);

#Filter

Filter records by ban status (uses the onlyBanned / withoutBanned scopes):

use JeffersonGoncalves\Filament\Ban\Tables\Filters\BanFilter;

$table->filters([
    BanFilter::make(),
]);

#Development

# Run static analysis
composer analyse

# Run tests
composer test

# Format code
composer format

#Changelog

Please see CHANGELOG for more information on what has changed recently.

#Contributing

Please see CONTRIBUTING for details.

#Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

#Credits

#License

The MIT License (MIT). Please see License File for more information.

The author

Jefferson Gonçalves avatar Author: Jefferson Gonçalves

I'm a Full Stack PHP Developer from Assis, SP, Brazil with over 18 years of hands-on experience building robust platforms, managing server infrastructures, and crafting scalable solutions for businesses of all sizes.

My passion lives in the open source world — I actively maintain 20+ Filament plugins and a growing collection of Laravel packages used by thousands of developers worldwide. I believe great software should be accessible to everyone.

Plugins
32
Stars
190

From the same author