PHP code example of enimiste / laravel-uniqueable-jobs-l54
1. Go to this page and download the library: Download enimiste/laravel-uniqueable-jobs-l54 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/ */
enimiste / laravel-uniqueable-jobs-l54 example snippets
Com\NickelIT\UniqueableJobs\UniqueableJobsServiceProvider::class,
$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
bash
php artisan queue:table
php artisan vendor:publish --tag=migrations