PHP code example of yinsystems / filament-failed-jobs

1. Go to this page and download the library: Download yinsystems/filament-failed-jobs 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/ */

    

yinsystems / filament-failed-jobs example snippets


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

class AuthServiceProvider extends ServiceProvider
{
	protected $policies = [
        FailedJob::class => FailedJobPolicy::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');
	}
}