Created
June 6, 2020 14:45
-
-
Save ridwanbejo/43c22a8bcb8c27f5e1fd0990f3b8c4c2 to your computer and use it in GitHub Desktop.
laravel-queue-sqs - routes/web.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Laravel\Lumen\Routing\Router $router */ | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It is a breeze. Simply tell Lumen the URIs it should respond to | |
| and give it the Closure to call when that URI is requested. | |
| | |
*/ | |
use App\Jobs\ExampleJob; | |
use App\Jobs\HelloWorldJob; | |
$router->get('/', function () use ($router) { | |
return $router->app->version(); | |
}); | |
$router->get('/test-queue', function () use ($router){ | |
dispatch(new ExampleJob); | |
dispatch(new HelloWorldJob("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