The Wire · Showcase
LARAVEL 13 SHIPS JSON EXCEPTIONS FOR API ROUTES BY DEFAULT
By RepoJournal · Filed · About Laravel
Laravel's new default configuration now renders exceptions as JSON on API routes without requiring explicit Accept headers, fixing a friction point for API developers using tools like Postman and curl.
The framework landed a significant quality-of-life improvement for API development [1]. New Laravel applications will automatically return JSON-formatted exception responses for any route under `api/*`, eliminating the need for clients to send `Accept: application/json` headers. This uses the existing `shouldRenderJsonWhen()` API and doesn't introduce new surface area [2]. Alongside that, the framework fixed type hints in the Number class where `spell()`, `ordinal()`, and `spellOrdinal()` were incorrectly documented as returning `string` when they actually return `string|false` [3], and added support for URI-based SQLite connections using the `file:` prefix [4], matching modern PDO capabilities. Moat 1.0.4 shipped with dependency bumps [5], while maestro pinned GitHub Actions across starter kits for improved supply chain security [6].
Action items
- → Review the JSON exception rendering config in your new 13.x apps - it's now the default laravel/laravel [plan]
- → Update type hints in existing Number utility calls if you're relying on strict return typing laravel/framework [monitor]
- → Pin GitHub Actions in your starter kit workflows if you haven't already laravel/maestro [plan]
References
- [1] [13.x] Render JSON exceptions for API routes by default (#6824) laravel/laravel
- [2] [13.x] Render JSON exceptions for API routes by default ↗ laravel/laravel
- [3] [13.x] Fix incorrect @return types in Number::spell(), ordinal(), and spellOrdinal() (#60263) laravel/framework
- [4] Supports using URI-based connection for SQLite using `file:` prefix (#60261) laravel/framework
- [5] v1.0.4 ↗ laravel/moat
- [6] Pin starter kit actions & ensure dependabot updates them ↗ laravel/maestro
FAQ
- What changed in Laravel on May 26, 2026?
- Laravel's new default configuration now renders exceptions as JSON on API routes without requiring explicit Accept headers, fixing a friction point for API developers using tools like Postman and curl.
- What should Laravel teams do about it?
- Review the JSON exception rendering config in your new 13.x apps - it's now the default • Update type hints in existing Number utility calls if you're relying on strict return typing • Pin GitHub Actions in your starter kit workflows if you haven't already
- Which Laravel repositories shipped on May 26, 2026?
- laravel/laravel, laravel/framework, laravel/moat, laravel/maestro