RepoJournal
Laravel

@laravel

PHP's most popular framework — Forge, Vapor, and a massive paying audience

What actually shipped in Laravel, written up every day — commits, pull requests, releases, and security advisories.

One email a day. Unsubscribe in one click.

Pick a date

Topics: PHP Full archive →

The Wire · Showcase

LARAVEL 13.x CUTS DEAD CODE FROM JSON:API RESOURCES, ADDS NATIVE ROUTE KEY ATTRIBUTES

By RepoJournal · Filed · About Laravel

The framework dropped never-executed generator logic that was silently re-resolving nested relationships on every request, while introducing a cleaner declarative way to customize route binding keys.

Laravel 13.x shipped a cleanup that removes dead code in JSON:API resource compilation [1]. The `compileIncludedNestedRelationshipsMap()` method was calling a generator function without iterating it, meaning the generator body never executed and nested relationships were being resolved twice for no reason. This is a pure removal with zero user impact, but it signals the framework's quality bar on 13.x work.

More important for day-to-day work: a new `#[RouteKey]` class attribute lands for Eloquent models [2]. Instead of overriding `getRouteKeyName()` on every model that needs a custom route binding key (slug, uuid, etc.), you now declare it directly on the class with PHP attributes, matching how `#[ObservedBy]` and `#[ScopedBy]` work. This is the Laravel attribute story continuing to mature.

Database connection handling got a new lost connection string added [3], improving error clarity when connections drop unexpectedly. On the docs side, Horizon worker options and metrics configuration are now properly documented [4], covering memory limits, job caps, and metrics trimming that were previously hidden in the published config stub. Horizon 5.48.0 also shipped a new `cspNonce()` method, now documented [5].

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] [13.x] Remove never-executed nested relationship compilation in JSON:API resources (#60829) laravel/framework
  2. [2] Add #[RouteKey] class attribute to Eloquent models ↗ laravel/framework
  3. [3] Added a new lost connection string and a test (#60819) laravel/framework
  4. [4] Document Horizon worker options and metrics snapshot trimming ↗ laravel/docs
  5. [5] Document Horizon::cspNonce method ↗ laravel/docs

Quick answers

What shipped in Laravel on July 21, 2026?
The framework dropped never-executed generator logic that was silently re-resolving nested relationships on every request, while introducing a cleaner declarative way to customize route binding keys. In total, 8 commits and 8 pull requests landed.
Who contributed to Laravel on July 21, 2026?
5 developers shipped this update, including DAFFA ADITYA PRATAMA, nimnaherath, Chris Lloyd, pushpak1300, and sgilberg.
What were the notable Laravel updates?
[13.x] Remove never-executed nested relationship compilation in JSON:API resources (#60829), Add #[RouteKey] class attribute to Eloquent models, and Added a new lost connection string and a test (#60819).

More from @laravel

Daily updates, in your inbox

Follow Laravel

What actually shipped in Laravel, written up every day — commits, pull requests, releases, and security advisories.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?