Ben Borgers

How to dispatch a job locally from Laravel Tinker

January 27, 2021

When developing a Laravel app locally, the ::dispatch() method might not work from Laravel Tinker, since a real queue driver isn't running.

Instead, after starting Tinker (php artisan tinker), try this command:

\Bus::dispatch(new App\Jobs\SomeJob($arguments))

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗