Tinkerwell 4 is out now! Get the most popular PHP Scratchpad application. 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.

Tinkerwell: The PHP Scratchpad

Enjoy coding and debugging in an editor designed for fast feedback and quick iterations. It's like a shell for your application – but with multi-line editing, code completion, and more.