Ban
CommunityBan 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.
Author:
Jefferson Gonçalves
Package health
BetaAutomated checks of this plugin's Composer package
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.lockis 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.2supports current PHP8.5. - Skipped: Current Symfony version supported
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
.
Documentation
- Version Compatibility
- Installation
- Preparing your model
- Usage
- Development
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- 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
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.
From the same author
EvolutionKit v5
A robust starter kit built on Laravel 13.x and Filament 5.x, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
Author:
Jefferson Gonçalves
MFAKit v5
MFAKit is a robust starter kit built on Laravel 13.x and Filament 5.x, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
Author:
Jefferson Gonçalves
Refresh Sidebar
Automatically refresh the sidebar navigation when certain events occur, ensuring menu items and badges are always up to date.
Author:
Jefferson Gonçalves
FilaKit v5
FilaKit is a robust starter kit, designed to accelerate the development of modern web applications with a ready-to-use multi-panel structure.
Author:
Jefferson Gonçalves
Featured Plugins
A selection of plugins curated by the Filament team
Blueprint
Filament Blueprint is a premium Laravel Boost extension that helps AI agents produce accurate, detailed implementation plans and security reports for Filament apps.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Spotlight Pro
Browse your Filament Panel with ease. Filament Spotlight Pro adds a Spotlight like Command Palette to your Filament Panel.
Dennis Koch