This is a package to monitor background jobs for FilamentPHP. It is inspired by Laravel Horizon and is compatible with all drivers.
![Screenshot 2023-05-29 at 16 43 07](https://private-user-images.githubusercontent.com/1169456/241756156-ce654e0a-c1a1-4ed3-95a8-dc3f4fa7cea9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0MTA5NTEsIm5iZiI6MTcyMzQxMDY1MSwicGF0aCI6Ii8xMTY5NDU2LzI0MTc1NjE1Ni1jZTY1NGUwYS1jMWExLTRlZDMtOTVhOC1kYzNmNGZhN2NlYTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTFUMjExMDUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjhmMWVkMzAyNTE1MDAwZWYzZmFiZmE1Yzg3NTJjMGUxYTgzMmEwMTY2M2JhNjY0ODY3NjNkZmQ5ODg0YTY4ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.4LJ59d3GZvdJ-ZEhFF8ZS4iMC-1smLVJRxcICnSY4VQ)
![Screenshot 2023-05-29 at 16 42 46](https://private-user-images.githubusercontent.com/1169456/241756182-fd7b91ac-b932-49a7-ab98-4e8ea8de0b83.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM0MTA5NTEsIm5iZiI6MTcyMzQxMDY1MSwicGF0aCI6Ii8xMTY5NDU2LzI0MTc1NjE4Mi1mZDdiOTFhYy1iOTMyLTQ5YTctYWI5OC00ZThlYThkZTBiODMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTFUMjExMDUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjBlN2NkZmUzMzc4YTI1NDcxZTc0ZDk0NWFlMTkzODRkYjA1MWI2M2M4MjBjYzUxNjMxYjY2MWY0Y2Y0ZWYwOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.zOgx-fTKE7_FKwRCzBNkMqPSln8XcL4yz_wwltAD7BM)
You can install the package via composer:
composer require croustibat/filament-jobs-monitor
You can publish the config file with:
php artisan vendor:publish --tag="filament-jobs-monitor-config"
This is the content of the published config file:
return [
'navigation' => [
'enabled' => true,
'group_label' => 'Settings',
'icon' => 'heroicon-o-chip',
],
];
You can publish and run the migrations with:
php artisan vendor:publish --tag="filament-jobs-monitor-migrations"
php artisan migrate
Just run a Background Job and go to the route /admin/queue-monitors
to see the jobs.
Go to example folder to see a Job example file.
Then you can call your Job with the following code :
public static function table(Table $table): Table
{
return $table
// rest of your code
...
->bulkActions([
BulkAction::make('export-jobs')
->label('Background Export')
->icon('heroicon-o-cog')
->action(function (Collection $records) {
UsersCsvExportJob::dispatch($records, 'users.csv');
Notification::make()
->title('Export is ready')
->body('Your export is ready. You can download it from the exports page.')
->success()
->seconds(5)
->icon('heroicon-o-inbox-in')
->send();
})
])
}
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.