Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
HPWebdeveloper committed Feb 4, 2024
1 parent 3f22e1d commit 372ae4a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

## Introduction:

If you're running an application with a queue driver other than Redis, which is exclusively supported by [Laravel Horizon](https://github.com/laravel/horizon), you might be missing out on the elegant features that Horizon offers. Laravel Horizon is known for its elegance and a wide range of implemented features. One of its standout features is its ability to present detailed information about failed job payloads and automatically load new failed jobs.
If you're running an application with a queue driver other than Redis or dispatch a job to [a particular connection](https://laravel.com/docs/10.x/queues#dispatching-to-a-particular-connection) other than Redis, which is exclusively supported by [Laravel Horizon](https://laravel.com/docs/10.x/horizon), you might be missing out on the elegant features that Horizon offers. Laravel Horizon is known for its elegance and a wide range of implemented features. One of its standout features is its ability to present detailed information about failed job payloads and automatically load new failed jobs.

In your specific application, if you've been longing for a similar Horizon-like UI to monitor failed_jobs, the Laravel-Failed-Jobs package has got you covered. This package simplifies the process of visualizing failed jobs.
In your specific application, if you've been longing for a similar Horizon-like UI to monitor failed jobs, the Laravel-Failed-Jobs package has got you covered. This package streamlines the visualization of failed jobs, eliminating the need to connect to a database client locally and search through `failed_jobs` records to identify the cause of a job's failure.

![Screenshot 2024-02-01 at 7 55 42 PM](https://github.com/HPWebdeveloper/laravel-failed-jobs/assets/16323354/2ec7ebad-1ad9-4927-8bff-5ce4002e1a7c)

Expand All @@ -19,30 +19,36 @@ In your specific application, if you've been longing for a similar Horizon-like
- Seamless Integration: You can seamlessly integrate the Laravel-Failed-Jobs package into your project, even if you are already using Laravel Horizon. There's no conflict between the two.
- While Horizon primarily reads and writes data to Redis, Laravel-Failed-Jobs retrieves data from the failed_jobs table.
- With Laravel-Failed-Jobs, you can enjoy the convenience of monitoring failed jobs in your application, regardless of your queue driver. This package brings the power and elegance of Laravel Horizon's failed job handling to your specific setup.

- Remote Connection Mode: This package offers two operational modes, each with its distinct setup. The Basic mode setup and dashboard authentication mirror that of Laravel Horizon. Remote mode is particularly beneficial for applications functioning solely as API service providers, where there is no user model or admin user. In such scenarios, the Gate definition within `FailedJobsServiceProvider`, which typically restricts access the Laravel-Failed-Jobs dashboard in non-local environments, is not applicable. Remote mode enables you to access the application remotely from your local machine via a browser or through another Laravel application served in another URL address.

As you correctly understood, it's important to note that the Laravel-Failed-Jobs package focuses solely on enhancing the visualization of failed jobs and does not offer managing of faild jobs or the comprehensive set of robust features found in Laravel Horizon.


## Installation:
## Installation (basice mode):
You may install Laravel-Failed-Jobs package into your project using the Composer package manager:

```bash
composer require hpwebdeveloper/laravel-failed-jobs
```

After installing Laravel-Failed-Jobs, publish its assets using the failedjobs:install Artisan command:

After installing Laravel-Failed-Jobs, publish the assets using the `failedjobs:install` Artisan command.
```bash
php artisan failedjobs:install
```
This command will automatically publish the `failedjobs` config file, `FailedJobsServiceProvider` service provider and also the resource view files into the `public/vendor/failedjobs` directory.

To upgrade the package, you need to use the following command after upgrading via composer:

```bash
php artisan failedjobs:publish
```

## Dashboard

The Laravel-Failed-Jobs dashboard is accessible through the `/failedjobs` route by default. However, if you wish to define a new path, you can do so by setting the `FAILEDJOBS_PATH` variable in the `.env` file.

## Dashboard Authorization

Find `app/Providers/FailedJobsServiceProvider.php` and then follow the [same document of Horizon](https://laravel.com/docs/10.x/horizon#dashboard-authorization) to secure the dashboard in production environment.
Find `app/Providers/FailedJobsServiceProvider.php` class which applies Laravel `Gate` to determine who can access FailedJobs in non-local environments. and then follow the [same document of Horizon](https://laravel.com/docs/10.x/horizon#dashboard-authorization) to secure the dashboard in production environment.

![Screenshot 2024-02-01 at 7 54 17 PM](https://github.com/HPWebdeveloper/laravel-failed-jobs/assets/16323354/05abc4ab-ede6-4e90-b713-bc540015435d)

Expand Down

0 comments on commit 372ae4a

Please sign in to comment.