Skip to content

Instantly share code, notes, and snippets.

@pyaesone17
Created February 7, 2018 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyaesone17/963e9a8cbedb279552c760a45517ee17 to your computer and use it in GitHub Desktop.
Save pyaesone17/963e9a8cbedb279552c760a45517ee17 to your computer and use it in GitHub Desktop.
route for queue
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('push-job',function(){
$user = App\User::firstOrFail();
// Pushing Job to Queue Store
dispatch((new \App\Jobs\WelcomeEmailJob($user)));
return "Success";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment