PHP code example of tapp / filament-authentication-log

1. Go to this page and download the library: Download tapp/filament-authentication-log library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tapp / filament-authentication-log example snippets


use Tapp\FilamentAuthenticationLog\FilamentAuthenticationLogPlugin;
 
public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentAuthenticationLogPlugin::make()
                // ->panelName('admin') // Optional: specify the panel name if needed
        ]);
}

use Tapp\FilamentAuthenticationLog\RelationManagers\AuthenticationLogsRelationManager;
 
public static function getRelations(): array
{
    return [
        AuthenticationLogsRelationManager::class,
        // ...
    ];
}

public function getNameAttribute(): string
{
    return trim($this->first_name . ' ' . $this->last_name);
}

'authenticatable' => [
    'field-to-display' => 'name', // Change 'name' to your custom field if needed
],
bash
php artisan vendor:publish --tag="filament-authentication-log-translations"
bash
php artisan vendor:publish --tag="filament-authentication-log-config"