A Filament plugin for Laravel Authentication Log package.
This package provides a Filament resource and a relation manager for Laravel Authentication Log.
- PHP 8.1+
- Filament 3
Filament | Laravel | Filament Authentication Log |
---|---|---|
2.x | 9.x/10.x | 2.x |
3.x | 10.x/11.x | 3.0.x/3.1.x |
You can install the plugin via Composer:
composer require tapp/filament-authentication-log:"^3.1"
Follow the configuration instruction for laravel-authentication-log
- Publish and run the migrations
- Add the
AuthenticationLoggable
andNotifiable
traits to yourUser
model
Note For Filament 2.x check the 2.x branch
You can publish the translations files with:
php artisan vendor:publish --tag="filament-authentication-log-translations"
You can publish the config file with:
php artisan vendor:publish --tag="filament-authentication-log-config"
Add this plugin to a panel on plugins()
method.
E.g. in app/Providers/Filament/AdminPanelProvider.php
:
use Tapp\FilamentAuthenticationLog\FilamentAuthenticationLogPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
FilamentAuthenticationLogPlugin::make(),
//...
]);
}
That's it! Now you can see the Authentication Log resource on left sidebar.
Add the Tapp\FilamentAuthenticationLog\RelationManagers\
to the getRelations()
method on the Filament resource where the model uses the AuthenticationLoggable
trait.
E.g. in App\Filament\Resources\UserResource.php
:
use Tapp\FilamentAuthenticationLog\RelationManagers\AuthenticationLogsRelationManager;
public static function getRelations(): array
{
return [
AuthenticationLogsRelationManager::class,
// ...
];
}