To exclude the admin user from being recorded in Laravel Pulse, you need to modify the configuration to filter out the admin user based on their email. The configuration you provided is almost correct, but it seems like there might be a syntax issue or a misunderstanding of how the filter function should be implemented.
Here's a corrected version of your configuration:
Recorders\UserJobs::class => [
'enabled' => env('PULSE_USER_JOBS_ENABLED', true),
'sample_rate' => env('PULSE_USER_JOBS_SAMPLE_RATE', 1),
'ignore' => [
// '/^Package\\Jobs\\/',
],
'filter' => function ($user) {
return $user->email !== '[email protected]';
},
],
Make sure that the filter function is correctly implemented and that the email comparison is accurate. After updating the configuration, you should clear the cache and optimize the application again:
php artisan optimize:clear
php artisan config:cache
This should ensure that the admin user with the email [email protected] is excluded from being recorded in Laravel Pulse.