8000 Merge pull request #701 from maxklenk/patch-2 · laravel/lumen-framework@0e438d9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e438d9

Browse files
authored
Merge pull request #701 from maxklenk/patch-2
Provide dispatchNow along with dispatch function
2 parents ec49edd + a340a6a commit 0e438d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Routing/ProvidesConvenienceMethods.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ public function dispatch($job)
165165
return app('Illuminate\Contracts\Bus\Dispatcher')->dispatch($job);
166166
}
167167

168+
/**
169+
* Dispatch a command to its appropriate handler in the current process.
170+
*
171+
* @param mixed $job
172+
* @param mixed $handler
173+
* @return mixed
174+
*/
175+
public function dispatchNow($job, $handler = null)
176+
{
177+
return app('Illuminate\Contracts\Bus\Dispatcher')->dispatchNow($job, $handler);
178+
}
179+
168180
/**
169181
* Get a validation factory instance.
170182
*

0 commit comments

Comments
 (0)
0