2017 © Pedro Peláez
 

library laravel-uniqueable-jobs-l54

Laravel 5.4 uniqueable jobs support

image

enimiste/laravel-uniqueable-jobs-l54

Laravel 5.4 uniqueable jobs support

  • Tuesday, February 27, 2018
  • by nouni.elbachir
  • Repository
  • 2 Watchers
  • 3 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Laravel Uniqueable Jobs

Install

Require this package with composer using the following command (Laravel 5.6) :, (*1)

composer require "enimiste/laravel-uniqueable-jobs-l54:5.6.*"

For Laravel 5.4 :, (*2)

composer require "enimiste/laravel-uniqueable-jobs-l54:5.4.*"

After updating composer, add the service provider to the providers array in config/app.php, (*3)

Com\NickelIT\UniqueableJobs\UniqueableJobsServiceProvider::class,

Publish migration :, (*4)

php artisan queue:table
php artisan vendor:publish  --tag=migrations

In your Jobs classes use Com\NickelIT\UniqueableJobs\Dispatchable and Com\NickelIT\UniqueableJobs\Uniqueable instead of the default ones.
NB : This trait should be used directly in the job class and not in the base class if exists., (*5)

To ensure that a given job will be stored in the database once per model and model id you use ->unique(Model::class, $model->id) on the job instance or after calling dispatch() method like :, (*6)

$u = User::first();
DoSomethingJob::dispatch('Hello from unique job ' . $u->email)
                        ->unique(User::class, $u->id);
DoSomethingJob::dispatch('Hello from unique job ' . $u->email)
                        ->unique(User::class, $u->id);
//In this case the job will be stored once if it was already in the db

License

The Laravel Uniqueable Jobs is open-sourced software licensed under the MIT license, (*7)

The Versions

27/02 2018

dev-master

9999999-dev

Laravel 5.4 uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR

27/02 2018

v5.6.0

5.6.0.0

Laravel 5.4 uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR

31/10 2017

v5.4.4

5.4.4.0

Laravel 5.4 uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR

23/10 2017

v5.4.3

5.4.3.0

Laravel 5.4 uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR

23/10 2017

v5.4.2

5.4.2.0

Laravel 5.4 uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR

23/10 2017

v5.4.1

5.4.1.0

Laravel uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR

23/10 2017

v5.4.0

5.4.0.0

Laravel uniqueable jobs support

  Sources   Download

MIT

The Requires

 

by NOUNI EL BACHIR