devtical/filament-sanctum
Filament Sanctum adds a Filament panel for managing Laravel Sanctum API tokens. Create and view personal access tokens from the admin UI, with publishable config and translations for easy customization.
composer.json is critical to avoid breaking changes.PersonalAccessToken model queries (e.g., withTrashed()) or add Filament pagination.PersonalAccessToken queries.hasAccess() checks respect tenant contexts.personal_access_tokens table. Custom token tables would need middleware/config tweaks.config/sanctum.php).composer require devtical/filament-sanctum
php artisan vendor:publish --tag=filament-sanctum-config
php artisan vendor:publish --tag=filament-sanctum-translations
config/filament-sanctum.php for Sanctum model/class overrides.app/Providers/Filament/AdminPanelProvider.php:
->plugin(FilamentSanctumPlugin::make())
sanctum:flush cautiously).filament/spatie-laravel-permission (if using roles/permissions).filament/medialibrary (no direct impact).laravel/sanctum or spatie/laravel-permission should coexist if configured properly.HasApiTokens trait is widely adopted; minimal refactoring expected.PersonalAccessToken model or CLI.devtical/filament-sanctum and Sanctum for breaking changes. Use composer why-not to audit updates.config/filament-sanctum.php + config/sanctum.php).PersonalAccessToken model events (e.g., creating, deleting).php artisan filament:cache:clear) and view logs (storage/logs/laravel.log).w.kristories@gmail.com).PersonalAccessToken queries may slow with >5K tokens. Optimizations:
tokenable_id, abilities columns.SoftDeletes trait) for revoked tokens.revoke() method with delete: true.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Sanctum DB corruption | Token data loss | Regular DB backups; test sanctum:flush in staging. |
| Filament plugin conflict | UI broken or token management fails | Isolate testing; use filament:disable for debugging. |
| Token revocation race condition | Inconsistent API access | Implement retries or queue revocation jobs. |
| Package abandonment | No updates/security fixes | Fork the repo or engage the author for maintenance. |
| Laravel/Sanctum major version bump | Compatibility break | Pin versions in composer.json; test early. |
create, delete) and their API implications.php artisan sanctum:prune).How can I help you explore Laravel packages today?