Dispatch Jobs in Laravel Tinker AKA Why Laravel Tinker does not dispatch Jobs?

TL;DR

SendEmailJob::dispatch();1;

Dispatching Jobs through Laravel Tinker

SendEmailJob::dispatch();

Why Laravel Tinker did not Dispatch the Job for the First Time?

Solution

app(\Illuminate\Contracts\Bus\Dispatcher::class)->dispatch(new SendEmailJob());
SendEmailJob::dispatch();1

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store