Laravel 13.21 ships several developer-facing additions: a #[RouteKey] PHP attribute for declaratively setting the route model binding column on Eloquent models (replacing getRouteKeyName() overrides), a base64 validation rule that enforces strict RFC 4648 encoding, a #[RequestAttribute] contextual attribute for injecting request bag values directly into controller parameters, and expanded Image component output formats (PNG, GIF, AVIF, BMP) alongside a fix for the AVIF MIME mapping. The release also introduces a customizable ApplicationBuilder via a protected static property, a standalone illuminate/concurrency subsplit, and a range of bug fixes covering database transaction rollback callbacks, multibyte string handling, enum key support in cache/logging, and pipeline/serve command corrections.
Table of contents
# #[RouteKey] Attribute for Eloquent Models# base64 Validation Rule# #[RequestAttribute] Contextual Attribute# More Output Formats for the Image Component# Customizable Application Builder# Concurrency Subsplit# Other Fixes and Improvements68.7K Impressions1 Comment