Skip to content

Instantly share code, notes, and snippets.

@ridwanbejo
Created June 12, 2020 00:16
Show Gist options
  • Save ridwanbejo/ceac0f310e974ffcc09947575c73b6eb to your computer and use it in GitHub Desktop.
Save ridwanbejo/ceac0f310e974ffcc09947575c73b6eb to your computer and use it in GitHub Desktop.
laravel-queue-sqs - routes/web.php v2
<?php
use Illuminate\Support\Facades\Storage;
use App\Jobs\ExampleJob;
use App\Jobs\HelloWorldJob;
use Ramsey\Uuid\Uuid;
...
$router->get('/test-queue', function () use ($router){
$uuid = Uuid::uuid4();
dispatch(new ExampleJob);
dispatch(new HelloWorldJob($uuid, "Hello world dari Serverless ID!"));
return "ExampleJob dan HelloWorldJob sedang dijalankan!";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment