Queue Routing and Attributes in Laravel 13: Field Notes

Laravel 13 was released on March 17, 2026. It supports PHP 8.3–8.5, with bug fixes running until the third quarter of 2027 and security fixes until March 17, 2028. It's a release that keeps breaking changes to a minimum, and on several client projects we completed the upgrade more smoothly than we expected. Below are the three topics that actually proved useful to us.

Centralizing queue routing

Previously, which connection and which queue a job would run on was scattered around, either inside the job class or across every dispatch call. In Laravel 13, this rule can be defined centrally:

Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'podcasts');

Here's its value in the field: the queue topology now lives in one place, as an infrastructure decision. When you want to move a job to the "slow" queue, you don't touch the job class, so you don't rewrite that class's tests. The classic problem of long-running report generation and critical notification delivery sharing the same worker pool can be solved in a single file.

Comparison of queue routing rules scattered across job classes versus defined centrally with Queue::route.
The queue topology now lives in one place as an infrastructure decision.

Attributes reduce clutter

The new attributes for controllers and job classes — #[Middleware], #[Authorize], #[Tries], #[Backoff], #[Timeout], #[FailOnTimeout] — make the routes file readable again, especially in large admin panels. Our experience points in one direction: moving authorization to the top of the controller is a good idea, because a developer reading a method can see who has access on the same screen. But don't try to empty out the routes file entirely; being able to see at a glance which URL goes where is still valuable.

On the queue side, #[Tries] and #[Backoff] are especially useful for jobs that call third-party APIs. Declaring the retries and the backoff interval at the top of the job class lasts longer than a comment documenting how that job talks to the outside world.

When to use the AI SDK and vector search

The most talked-about part of Laravel 13 is the first-party AI SDK and the native vector queries that come with PostgreSQL + pgvector:

DB::table('documents')->whereVectorSimilarTo('embedding', 'best vineyards in Napa Valley')->limit(10)->get();

Impressive, but let's be honest: not every project needs these features. If you want semantic search over a corporate document archive, it's a sound choice. On a product catalog with 20,000 records, on the other hand, set up a proper full-text index first; vector search brings infrastructure cost and operational complexity along with it.

Upgrade order

  • Move PHP to 8.3 first; Laravel 13 requires it.
  • Test your custom middleware that relies on CSRF protection against the new PreventRequestForgery behavior; origin-based verification has been added.
  • Consolidate your queue configuration into a single file with Queue::route, then remove the old definitions from your job classes.
  • Always run the upgrade on a staging environment with real data first.
Laravel 13 upgrade order: PHP version, CSRF middleware testing, queue configuration, and a staging trial run.
Working through the upgrade plan step by step reduces risk.

JSON:API resources: good news for the mobile team

The Laravel 13 feature that touches the mobile side is support for JSON:API-compliant resources. Relationships, sparse fieldsets, and the correct headers come built into the framework. For a team consuming the API from Flutter, this means not having to deal with a different response format on every endpoint.

One caveat, though: if you decide to move to a standard, move all the way. An API where half the endpoints are JSON:API and the other half use the old custom format is harder to consume than an API with no standard at all. On existing projects, our preference is to write new modules in the new format and freeze the old endpoints behind a version number (v1): living with two clean versions instead of a mixed format.

Also check the things that didn't break

Release notes list the breaking changes, but they don't always catch silent behavior changes. There are three places to check after every upgrade: whether date/time formatting stays the same in API responses, the structure of validation error messages (if the mobile app parses them, it can break), and the retry behavior of queue jobs. Verifying these three with an end-to-end test pass is far cheaper than having to make a rollback decision.

If you have a growing API or admin panel sitting on an old Laravel version, putting together an upgrade plan is usually a one-day job. Write to us through our contact page, and we'll look at your current setup and flag the risky points in advance.