vstruhar / filament-failed-jobs

MIT License
1 stars 0 forks source link

Filament plugin for managing failed jobs

Latest Version on Packagist Total Downloads

The Laravel Filament plugin for managing failed jobs offers a streamlined interface to monitor, retry, and delete failed jobs directly from the admin panel.

Features

Installation

You can install the package via composer:

composer require vstruhar/filament-failed-jobs

You can publish the config file with:

php artisan vendor:publish --tag="filament-failed-jobs-config"

This is the contents of the published config file:

return [
    'resources' => [
        'enabled' => true,
        'label' => 'Failed job',
        'plural_label' => 'Failed jobs',
        'navigation_group' => 'Settings',
        'navigation_icon' => 'heroicon-o-exclamation-triangle',
        'navigation_sort' => null,
        'navigation_count_badge' => false,
    ],
];

Usage

Add FilamentFailedJobsPlugin to plugins array in AdminPanelProvider.php.

    // AdminPanelProvider.php
    ->plugins([
        // ...
        FilamentFailedJobsPlugin::make(),
    ])

Optionally you can chain enableNavigation method and add logic when to enable navigation button in the main sidebar.

    // AdminPanelProvider.php
    ->plugins([
        // ...
        FilamentFailedJobsPlugin::make(),
            ->enableNavigation(fn() => auth()->user()->role === 'admin'),
    ])

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.