Ban by Jefferson Gonçalves
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
Automated 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 stale Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Passed: Dependabot or Renovate configured
- Passed: Dependency update cooldown configured
- 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 10 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
Scanner Guard
Filament UI for jeffersongoncalves/laravel-scanner-guard: list, filter and unban vulnerability-scanner IPs directly from your admin panel. This plugin ships a read-only Resource over the scanner_guard_bans table, an active/expired filter, and unban / bulk unban actions.
Author:
Jefferson Gonçalves
Short URL
A complete Filament v5 admin layer for jeffersongoncalves/laravel-short-url — the headless core package that owns the models, migrations, redirect pipeline, tracking and every business rule. This package duplicates none of that: it's the presentation layer (Resources, Pages and Filament components) built on top of the core's Facade and contracts.
Author:
Jefferson Gonçalves
TeamKit v5
Teamkit 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
Service Desk
Filament plugin for complete service desk management — Admin, Agent, and User panels for tickets, SLA, and customer support.
Author:
Jefferson Gonçalves
Featured Plugins
A selection of plugins curated by the Filament team
Noir Theme
A theme that gives panels a focused, refined look with near-black surfaces, crisp actions, and restrained color.
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
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament