Laravel Magazine

Laravel 13.16 Ships the New artisan dev Command

Eric Van Johnson · News
Laravel 13.16 Ships the New artisan dev Command

Laravel 13.16.0 is out, and while point releases usually fly under the radar, this one bundles a few quality-of-life features worth pulling into your projects today. The headline is a first-party artisan dev command, but the queue and schema improvements are the kind of thing you will quietly appreciate for years.

php artisan dev โ€” One Command to Run Everything

If you have used the Laravel starter kits recently, you have probably seen the composer dev script that boots your server, queue worker, log tailer, and Vite dev server all at once using concurrently. Laravel 13.16 promotes that idea into a real Artisan command.

php artisan dev

Out of the box it runs your development processes together with combined, color-coded output, so you no longer need a handful of terminal tabs or a custom Composer script to get a full local environment running.

The clever part is the new --environment flag, which filters the output down to just the tasks that actually run in a given environment:

php artisan dev --environment=testing

This makes it easy to keep a single definition of your dev processes and slice it differently depending on what you are working on.

A Smarter Queue Worker With --stop-when-empty-for

Auto-scaling queue setups have always had an awkward edge: you want workers to wind down when there is no work, but --stop-when-empty stops the moment the queue drains, which causes thrashing when jobs arrive in bursts. The new --stop-when-empty-for option fixes that:

php artisan queue:work --stop-when-empty-for=60

The worker now stays alive until the queue has been empty for a configurable number of seconds before shutting down. On platforms that spin workers up and down based on demand, this is exactly the behavior you want: stay warm through short gaps, exit cleanly when the work genuinely dries up.

foreignUuidFor() Joins the Schema Builder

If you build apps on UUID primary keys, you have likely written out the column-plus-constraint dance by hand. Laravel already had foreignIdFor() for integer keys, and 13.16 adds the UUID equivalent:

Schema::create('invoices', function (Blueprint $table) {
    $table->id();
    $table->foreignUuidFor(Customer::class);
    $table->decimal('total', 10, 2);
    $table->timestamps();
});

It infers the column name and the referenced table from the model, just like foreignIdFor(), but generates a UUID-typed foreign key. Small helper, but it removes a real source of copy-paste mistakes in UUID-heavy schemas.

Also In This Release

A few smaller wins round things out: an enum-aware request helper for pulling typed enum values straight off the request, a withCookies() method available on all responses for attaching multiple cookies fluently, and an array-based maintenance mode driver that makes parallel testing more reliable by keeping maintenance state in memory rather than on disk.

Should You Upgrade?

Point releases within a major version are non-breaking, so moving from an earlier 13.x to 13.16 is a composer update away. The artisan dev command alone is worth it if you have been maintaining a hand-rolled concurrently script, and the queue worker change is a genuine improvement for anyone running workers on autoscaling infrastructure. As always, run your test suite after upgrading, but there is nothing here that should give you pause.


Sources: Laravel News โ€” The artisan dev Command in Laravel 13.16.0 ยท Laravel 13.x Release Notes

Stay Updated

Subscribe to our newsletter

Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.

Weekly articles
We send a new issue of the newsletter every week on Friday.
No spam
We'll never share your email address and you can opt out at any time.