imtigger/laravel-job-status-progress-view

Laravel Job Status Progress View

1.0 2020-03-24 11:44 UTC

This package is auto-updated.

Last update: 2024-10-24 22:46:14 UTC


README

Progress View page for Laravel Job Status

*** Testing phase only! ***

Requirements

  • PHP >= 5.6.4
  • Laravel >= 5.3
  • laravel-job-status >= 0.1.14

Installation

This plugin can only be installed from Composer.

Run the following command:

composer require imtigger/laravel-job-status-progress-view

1. Add Service Provider (Laravel < 5.5)

Add the following to your config/app.php:

'providers' => [
    ...
    Imtigger\LaravelJobStatus\LaravelJobStatusServiceProgressViewProvider::class,
]

Usage

In your routes.php, add this route helper:

    ...
    \Imtigger\LaravelJobStatus\ProgressController::routes();

In your controller, redirect to this route after dispatching your job

    $this->dispatch($job);
    return redirect()->action('\Imtigger\LaravelJobStatus\ProgressController@progress', [$job->getJobStatusId()]);

In your job, write the following fields to outputs

Customization

Run vendor:publish to publish progress view php artisan vendor:publish --provider="Imtigger\LaravelJobStatus\LaravelJobStatusServiceProgressViewProvider"

Then edit resources/views/vendor/laravel-job-status/progress.blade.php to adapt it to your favorite theme!