PHP code example of sanmark / laravel-queue-fallback
1. Go to this page and download the library: Download sanmark/laravel-queue-fallback 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/ */
sanmark / laravel-queue-fallback example snippets
namespace App\Jobs;
use Sanmark\QueueFallback\ShouldFallback;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class ExampleJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, ShouldFallback;
public function handle()
{
// Job logic here
}
}
use App\Jobs\ExampleJob;
ExampleJob::dispatchWithFallback($parameter);