PHP code example of ejoi8 / filament-email-logs

1. Go to this page and download the library: Download ejoi8/filament-email-logs 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/ */

    

ejoi8 / filament-email-logs example snippets


use App\Models\User;
use Ejoi8\FilamentEmailLogs\FilamentEmailLogsPlugin;

->plugin(
    FilamentEmailLogsPlugin::make()
        ->authorizeUsing(fn (?User $user): bool => $user?->canManageSystem() ?? false)
)



use Filament\Support\Icons\Heroicon;

return [
    'logging' => [
        'enabled' => true,
    ],

    'authorization' => [
        'ability' => null,
    ],

    'navigation' => [
        'group' => 'System',
        'sort' => 1,
        'icon' => Heroicon::OutlinedEnvelope,
    ],
];

'authorization' => [
    'ability' => 'view email logs',
],

use Filament\Support\Icons\Heroicon;

->plugin(
    FilamentEmailLogsPlugin::make()
        ->navigationGroup('System')
        ->navigationSort(1)
        ->navigationIcon(Heroicon::OutlinedEnvelope)
        ->authorizeUsing(fn (?User $user): bool => $user?->canManageSystem() ?? false)
)

->plugin(
    FilamentEmailLogsPlugin::make()
        ->authorizeUsing(fn (?User $user): bool => $user?->canManageSystem() ?? false)
)

// config/filament-email-logs.php
'authorization' => [
    'ability' => 'view email logs',
],

->plugin(FilamentEmailLogsPlugin::make())
bash
php artisan migrate
bash
php artisan vendor:publish --tag=filament-email-logs-config
bash
php artisan vendor:publish --tag=filament-email-logs-views
bash
./vendor/bin/pest tests/Feature/EmailLogResourceTest.php tests/Feature/UserRoleAccessTest.php
vendor/bin/pint --dirty --format agent