Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Include dispatchSync in the DispatchesJobs trait #37063

Merged
merged 3 commits into from Apr 20, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Illuminate/Foundation/Bus/DispatchesJobs.php
Expand Up @@ -27,4 +27,17 @@ public function dispatchNow($job)
{
return app(Dispatcher::class)->dispatchNow($job);
}

/**
* Dispatch a command to its appropriate handler in the current process.
*
* Queueable jobs will be dispatched to the "sync" queue.
*
* @param mixed $job
* @return mixed
*/
public function dispatchSync($job)
{
return app(Dispatcher::class)->dispatchSync($job);
}
}