Skip to content

Laravel 13: New Features, Breaking Changes and How to Upgrade

Laravel 13 brings a first-party AI SDK, vector search and a PHP 8.3 minimum. See the new features, support dates, breaking changes and a step-by-step upgrade from Laravel 12.

Milad Mostafaei 9 min read Updated: September 18, 2026
Laravel 13 logo next to a PHP code editor and upgrade steps
Table of contents
  1. Release date and PHP requirements
  2. Support policy: Laravel 11, 12 and 13
  3. What's new in Laravel 13
  4. The Laravel AI SDK
  5. Semantic and vector search
  6. PHP attributes almost everywhere
  7. Queue routing and Cache::touch
  8. JSON:API resources and request forgery protection
  9. Breaking changes to check
  10. How to upgrade from Laravel 12 to Laravel 13
  11. Ecosystem updates
  12. Availability: who should upgrade now?
  13. Frequently asked questions
  14. When was Laravel 13 released?
  15. What PHP version does Laravel 13 require?
  16. How long does upgrading from Laravel 12 to 13 take?
  17. Does Filament work with Laravel 13?
  18. Is Laravel 12 still supported?
  19. Conclusion

Laravel 13 shipped on March 17, 2026, and six months later it is the version most new Laravel projects start on. The release has two themes: first-party tooling for building AI-powered applications, and a deliberate effort to keep breaking changes to a minimum. The official upgrade guide estimates that moving from Laravel 12 takes about 10 minutes.

This guide covers the PHP requirement, how long each recent version is supported, the headline features with code verified against the official docs, and the breaking changes worth checking. It ends with a step-by-step upgrade path from Laravel 12 and a quick look at the surrounding ecosystem.

Release date and PHP requirements

Laravel ships a new major version roughly once a year, and Laravel 13 landed on schedule in the first quarter of 2026. Laravel News covered the launch on release day, noting the team's focus on "minimizing breaking changes".

The key requirement is PHP 8.3 or newer. PHP 8.3, 8.4 and 8.5 are all supported. If your Laravel 12 app still runs on PHP 8.2, upgrade PHP first. For what it's worth, I run my own site on Laravel 13 with PHP 8.4 and Filament 5, and the stack has been stable in production.

Support policy: Laravel 11, 12 and 13

Every major Laravel release gets 18 months of bug fixes and two years of security fixes. The dates below come straight from the support policy table on laravel.com:

VersionPHPReleasedBug fixes untilSecurity fixes until
Laravel 118.2 – 8.4March 12, 2024September 3, 2025March 12, 2026
Laravel 128.2 – 8.5February 24, 2025August 13, 2026February 24, 2027
Laravel 138.3 – 8.5March 17, 2026Q3 2027March 17, 2028

Two things stand out. Laravel 11 is now end-of-life, and Laravel 12 stopped receiving bug fixes in August 2026. Laravel 12 apps still get security patches until February 2027, but the clock is running, so this is a good moment to schedule the upgrade.

What's new in Laravel 13

The Laravel AI SDK

The headline feature is a first-party AI SDK. It offers one API for text generation, tool-calling agents, embeddings, audio and images, with providers including OpenAI, Anthropic, Gemini, Mistral and Ollama. Install it with composer require laravel/ai, generate an agent with php artisan make:agent SalesCoach, and call it like this:

use App\Ai\Agents\SalesCoach;

$response = SalesCoach::make()->prompt('Analyze this sales transcript...');

return (string) $response;

The query builder gains whereVectorSimilarTo. Pass a plain string instead of a vector and Laravel generates the embedding for you through the AI SDK. It currently works with PostgreSQL using the pgvector extension and with MariaDB 11.7 or later:

$documents = DB::table('documents')
    ->whereVectorSimilarTo('embedding', 'Best wineries in Napa Valley')
    ->limit(10)
    ->get();

PHP attributes almost everywhere

Laravel 13 accepts PHP attributes in more than 15 places, including controllers, models, jobs and console commands. They are fully optional, and the existing property-based configuration keeps working. Jobs also gain attributes such as #[Tries], #[Backoff] and #[Timeout]. Here is the controller example from the release notes:

#[Middleware('auth')]
class CommentController
{
    #[Middleware('subscribed')]
    #[Authorize('create', [Comment::class, 'post'])]
    public function store(Post $post)
    {
        // ...
    }
}

Queue routing and Cache::touch

Queue::route lets you set the default connection and queue for a job class in one central place. Cache::touch extends an item's TTL without reading and re-storing its value, and returns false if the key does not exist:

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

Cache::touch('key', 3600);

JSON:API resources and request forgery protection

Laravel now includes first-party resources that produce JSON:API-compliant responses, so you no longer need a third-party package for that. The CSRF middleware, renamed PreventRequestForgery, also verifies request origin using the Sec-Fetch-Site header.

Breaking changes to check

The upgrade guide ranks each change by how likely it is to affect you. These are the ones most apps should review:

  • High impact: VerifyCsrfToken is now PreventRequestForgery. The old names remain as deprecated aliases, but you should update direct references, for example in withoutMiddleware calls.

  • Medium impact: the cache config has a new serializable_classes option that defaults to false, which hardens unserialization if your APP_KEY ever leaks. If you cache PHP objects, list the allowed classes explicitly.

  • Medium impact: upsert on MySQL and MariaDB now throws an InvalidArgumentException when uniqueBy is empty.

  • Low impact: default cache and Redis key prefixes and session cookie names now use hyphenated suffixes. If you never set them in .env, existing cache entries will be ignored after the upgrade.

  • Low impact: Bootstrap 3 pagination views now have explicit names (pagination::bootstrap-3), and the QueueBusy event's $connection property is now $connectionName.

How to upgrade from Laravel 12 to Laravel 13

  1. Create a new Git branch and back up your database.

  2. Run php -v locally and on every server to confirm you are on PHP 8.3 or newer.

  3. Update the constraints in composer.json:

    "laravel/framework": "^13.0",
    "laravel/boost": "^2.0",
    "laravel/tinker": "^3.0",
    "phpunit/phpunit": "^12.0",
    "pestphp/pest": "^4.0"
  4. Run composer update. If a third-party package blocks the update, upgrade it or look for a maintained alternative.

  5. Work through the breaking changes list, paying particular attention to CSRF, cache serialization and the cache and session prefixes.

  6. Short on time? Laravel Shift is a community-maintained service that automates the upgrade and opens a pull request with atomic commits. If you use an AI coding agent, Laravel Boost 2 adds an /upgrade-laravel-v13 command for tools such as Claude Code and Cursor.

  7. Run your test suite with php artisan test, then deploy to staging before production.

Ecosystem updates

  • Starter kits: the React, Vue, Svelte and Livewire kits ship with Laravel 13 and Inertia v3, and can be generated with team management from day one. Authentication runs on Laravel Fortify, with two-factor authentication enabled by default. A WorkOS AuthKit variant adds social login, passkeys and SSO.

  • Laravel Boost: an MCP server that gives AI agents accurate context about your app's structure, database and version-specific documentation. Install it with composer require laravel/boost --dev followed by php artisan boost:install.

  • Filament: recent Filament 5 releases (5.8 and later) accept Laravel 13 in their dependency constraints and run on Livewire 4.

Availability: who should upgrade now?

Laravel 13 is free and open source, and it installs from Packagist like any other release. The framework itself has no regional restrictions, but the AI SDK depends on third-party providers, and each provider has its own list of supported countries and terms. Local models through Ollama are a practical option for development.

Upgrade soon if you are on Laravel 12, which no longer receives bug fixes, or on Laravel 11, which no longer receives security fixes. If you deploy to shared hosting, check the PHP version your host offers first; composer check-platform-reqs tells you whether the server meets every requirement. If you are starting a new project, begin on Laravel 13.

Frequently asked questions

When was Laravel 13 released?

Laravel 13 was released on March 17, 2026.

What PHP version does Laravel 13 require?

PHP 8.3 at minimum. PHP 8.3, 8.4 and 8.5 are supported.

How long does upgrading from Laravel 12 to 13 take?

The official guide estimates 10 minutes. Large apps with many third-party packages may need more time to resolve dependencies and run tests.

Does Filament work with Laravel 13?

Yes. Recent Filament 5 releases support Laravel 13, and I use that combination in production.

Is Laravel 12 still supported?

Only for security fixes, until February 24, 2027. Bug fixes ended on August 13, 2026.

Conclusion

Laravel 13 is a low-friction upgrade that still brings real improvements: a first-party AI SDK, vector search, broader attribute support and built-in JSON:API resources, with only a handful of breaking changes. If your servers run PHP 8.3 or newer and you have decent test coverage, moving from Laravel 12 is an afternoon's work. Check your dependencies and hosting first, then upgrade.

Sources: official Laravel 13 release notes and upgrade guide on laravel.com, the Laravel blog (March Product Updates), Laravel News and Packagist/GitHub (March–September 2026).

Share: X Telegram LinkedIn WhatsApp

Comments (0)

No comments yet. Be the first!

Leave a comment