Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

adrolli/filament-failed-jobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moved

This plugin is now part of https://github.com/mooxphp/jobs

Filament Job Manager

Work in progress ...

Installation

You should install the package via Composer:

composer require amvisor/filament-failed-jobs
php artisan vendor:publish --tag=filament-failed-jobs

Authorization

If you would like to prevent certain users from accessing your page, you should register an FailedJobsPolicy/JobBatchesPolicy:

use App\Policies\FailedJobPolicy;
use Amvisor\FilamentFailedJobs\Models\FailedJob;
use Amvisor\FilamentFailedJobs\Models\JobBatch;

class AuthServiceProvider extends ServiceProvider
{
	protected $policies = [
		FailedJob::class => FailedJobPolicy::class,
		JobBatch::class  => JobBatchPolicy::class,
	];
}
namespace App\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class FailedJobPolicy
{
	use HandlesAuthorization;

	public function viewAny(User $user): bool
	{
		return $user->can('manage_failed_jobs');
	}
}

(same for JobBatchPolicy, if necessary).

This will prevent the navigation item(s) from being registered.

Changelog

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

License

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

About

Adds a failed-job resource to Filament

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages