Windy — Turn any HTML to Tailwind CSS! Learn more

Go back to Blog

Dispatching Laravel Jobs without reloading

Sebastian Schlein

One of my most common use-cases is dispatching Laravel jobs with Tinkerwell while I develop the job itself. Previously I did this via php artisan tinker and had to restart my tinker session every time I changed my code to get the latest changes. Tinkerwell always uses the most recent source code, and developing new jobs is as easy as it gets.

Just recently, I had to develop a job for a client that uploads order data for registered users to their newsletter provider. They use this data to trigger automated emails and send coupon codes, etc. To dispatch new jobs and test if the job is working, I run this code in Tinkerwell within the local application:

$order = Order::latest()->first();

dispatch(new UploadOrderDataToMailchimp($order));

This use case is just a small one, but it makes my life easier every time I develop a job in Laravel.

Tell us how you use Tinkerwell and we'll blog about it here.

Its time to Tinkerwell

The must-have tinker tool for every PHP and Laravel developer. This magical desktop app may not be able to fly. But when it comes to PHP code, it sure knows how to run.

Learn more