تفضيلات ملفات تعريف الارتباط
نستخدم ملفات تعريف الارتباط للحفاظ على تشغيل الموقع وتحسين تجربتك.
اعرف المزيد في سياسة الخصوصية .
N .
English العربية
الرئيسية عنّي أعمالي المدونة تواصل معي
العودة إلى المدونة
laravel news مارس 19, 2026

قراءة في 8 دقائق

Laravel 13 Is Here: Everything You Need to Know — New Features, Upgrade Guide

laravel 13

Laravel 13 might be the most "quietly powerful" release in years.

Zero breaking changes. PHP 8.3 minimum. And under the surface — this is the release that pushes Laravel fully into the AI era.

Laravel 13 ships with the stable Laravel AI SDK, native PHP Attributes across 15+ locations, JSON:API Resources, Semantic / Vector Search, and solid quality-of-life improvements across queues, cache, and security.

In this article, I'll cover what's new, how to upgrade, package readiness, and the full support timeline.

Let's get into it.


What's New in Laravel 13

1. Minimal Breaking Changes — By Design

This deserves to be said first. The Laravel team deliberately focused this release cycle on minimizing breaking changes while shipping continuous quality-of-life improvements.

From the official release notes:

"The Laravel 13 release is a relatively minor upgrade in terms of effort, while still delivering substantial new capabilities. Most Laravel applications may upgrade to Laravel 13 without changing much application code."

The only infrastructure-level change: PHP 8.3 is now the minimum required version (up from 8.2). Everything else is application-level and non-breaking.

2. Laravel AI SDK — Official Stable Release

The biggest announcement at Laracon EU 2026 wasn't just Laravel 13 — it was that the Laravel AI SDK exits beta and becomes officially stable on the same day.

This is Laravel's first-party toolkit for building AI-powered features. It provides a unified API for:

  • Text generation and conversational agents

  • Tool-calling agents with Laravel-native conventions

  • Embeddings and vector store integrations

  • Image generation from plain-language prompts

  • Audio synthesis for assistants and accessibility

  • Web search integration

The SDK supports multiple providers simultaneously — Anthropic, OpenAI, Google Gemini, and others — with automatic fallbacks if one provider goes down. Switching providers requires changing a single configuration line.

Here's what a basic agent call looks like:

use App\\Ai\\Agents\\SalesCoach;

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

And for image generation:

use Laravel\\Ai\\Image;

$image = Image::of('A donut sitting on the kitchen counter')->generate();
$rawContent = (string) $image;

3. Expanded PHP Attributes — The Biggest Visual Change

This is the feature that will change how your code looks every day. Laravel 13 introduces native PHP 8 Attributes as an alternative to class properties across 15+ framework locations.

use Illuminate\\Database\\Eloquent\\Attributes\\Table;
use Illuminate\\Database\\Eloquent\\Attributes\\Fillable;
use Illuminate\\Database\\Eloquent\\Attributes\\Hidden;

#[Table('invoices', key: 'invoice_id', keyType: 'string', incrementing: false)]
#[Fillable('amount', 'status', 'user_id')]
#[Hidden('internal_notes')]
class Invoice extends Model
{
    // Your model logic starts right here.
}

Attributes now apply to:

  • Models — #[Table], #[Fillable], #[Hidden], #[Casts]

  • Controllers — #[Middleware], #[Authorize]

  • Jobs — #[Tries], #[Backoff], #[Timeout], #[FailOnTimeout]

  • Commands — #[AsCommand] with signature and description

  • Listeners, Notifications, Mailables, Broadcast Events

Important: This is entirely optional and non-breaking. Existing property-based configuration continues to work. You can adopt attributes gradually, file by file, at your own pace.

4. JSON:API Resources

If you've built APIs before, you know every team ends up with a slightly different response format — some nest data inside "data", some return flat objects, some handle relationships one way, others differently. JSON:API is a specification that standardizes all of this. It defines exactly how API responses should be structured: how resources are formatted, how relationships are included, how pagination and errors are returned.

Laravel 13 adds first-party support for it, so instead of manually shaping every API response to match the spec, you get it out of the box. If you're building APIs consumed by frontend frameworks, mobile apps, or third-party integrations, this eliminates a lot of boilerplate and ensures consistency across your entire API surface.

5. Request Forgery Protection

Laravel 13 strengthens its default security posture with improved request forgery protection. This is a behind-the-scenes improvement to how Laravel handles CSRF and request validation, with stronger defaults out of the box.

Upgrade note: This is one of the areas the official upgrade guide flags for careful review, especially if you have custom middleware or non-standard request handling. Check the upgrade guide for specifics.

6. Queue Routing

A welcome addition for applications with complex queue architectures. Queue::route() lets you define default queue/connection routing rules for specific job classes in a central place:

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

7. Cache TTL Extension (Cache::touch)

A small feature that solves a surprisingly common annoyance. Cache::touch() extends a cached item's time-to-live without retrieving or re-writing the value:

Cache::touch('user-session:42', now()->addMinutes(30));

Before this, you'd have to get() the value, then put() it back with a new TTL — two operations instead of one. Under the hood, Redis uses a single EXPIRE command, Memcached uses TOUCH, and the database driver does one UPDATE. Works with every cache driver.

8. Semantic / Vector Search

Laravel 13 deepens its semantic search capabilities with native vector query support, embedding workflows, and tight integration with the AI SDK. You can run similarity searches directly from the query builder using PostgreSQL + pgvector:

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

PHP 8.3 — The Only Hard Requirement

Laravel 13 drops PHP 8.2 support and requires PHP 8.3 as the minimum. The official support table shows compatibility through PHP 8.5.


How to Upgrade to Laravel 13

You have three paths, depending on your comfort level and project complexity.

Option 1: Using AI Agents (Recommended for 2026)

This is the approach I've been using and recommending. Here's the workflow:

  1. Update Laravel Boost to the latest version (minimume v2.3.2)

  2. In you AI agent use laravel-boost:upgrade-laravel-v13 (MCP)

  3. Review the AI-generated PR, test, and merge

The AI agent approach handles the mechanical changes (dependency versions, renamed methods, configuration updates) automatically, letting you focus on the areas that need human judgment.

Option 2: Using Laravel Shift

Laravel Shift remains the gold standard for automated upgrades.

Option 3: Manual Upgrade

Follow the official upgrade guide. The key areas to review:

  1. PHP version — Must be 8.3+

  2. composer.json — Update laravel/framework to ^13.0

  3. Request forgery protection — New defaults may affect custom middleware

  4. Cache serialization — Review if you use custom cache drivers

  5. Cache and session naming defaults — Hyphenated prefixes are now the default

  6. Queue event changes — JobAttempted now passes the full Throwable instead of a boolean

  7. Route domain prioritization — Subdomain routes now register before non-domain routes

Run composer update, then run your test suite. For most applications, this should be a quick process.


Is Filament Ready for Laravel 13?

Yes. Filament shipped v5.4.0 on March 17, 2026 — the same day as Laravel 13's release — with full Laravel 13 support. The PR was merged by Dan Harrin (Filament's creator) as part of the release.

If you're running Filament v5.x, simply update:

composer update filament/filament

Other major packages you're likely using:

Package

Laravel 13 Status

Filament v5

✅ Supported (v5.4.0+)

Livewire

✅ Expected day-one support

Inertia.js

✅ Expected day-one support

Spatie packages

✅ Expected day-one support

Pest PHP

✅ Pest 4 is Laravel 13 ready

My recommendation: Check each package's GitHub releases page before upgrading. Don't assume — verify.


Laravel Support Timeline

Understanding the support timeline helps you plan upgrades strategically, not reactively.

Version

Release Date

Bug Fixes Until

Security Fixes Until

PHP Minimum

Laravel 11

March 12, 2024

August 2025

March 2026

8.2

Laravel 12

February 24, 2025

August 13, 2026

February 24, 2027

8.2

Laravel 13

March 17, 2026

~Q3 2027

~Q1 2028

8.3

Key takeaways:

  • Laravel 11 — Security fixes end this month (March 2026). If you're still on 11, upgrading should be a priority.

  • Laravel 12 — Still fully supported. Bug fixes until August 2026, security fixes until February 2027. No rush, but start planning.

  • Laravel 13 — You have until late 2027 for bug fixes and early 2028 for security. Plenty of runway.

For all Laravel releases: 18 months of bug fixes, 2 years of security fixes. This has been consistent since Laravel moved away from LTS releases after version 6.


Should You Upgrade Now?

Here's my honest take:

Upgrade now if:

  • You're starting a new project (use Laravel 13 from day one)

  • Your test coverage is above 70% and you're confident in your test suite

  • You want the AI SDK for new features you're building

  • You're on PHP 8.3+ already

Wait a few weeks if:

  • You rely on niche third-party packages that haven't confirmed Laravel 13 support

  • You're in the middle of a major feature release and can't afford any risk

  • Your production environment is still on PHP 8.2

Upgrade within 3 months regardless — Laravel 12's bug fix window closes in August 2026, and you want to be on 13 well before that.


What This Means for the Laravel Ecosystem

Laravel 13 confirms the direction the framework has been heading since Laravel 12: the era of AI-native web development. The AI SDK going stable isn't just a feature — it's a signal that building AI-powered features is now a first-class concern in Laravel, the same way authentication, queues, and caching are.

For PHP developers, this is significant. While other ecosystems require separate AI orchestration frameworks, Laravel bakes it directly into the framework you're already using. Same patterns, same testing tools, same deployment pipeline.

The PHP Attributes expansion is the other major shift. It doesn't change what you can do with Laravel — it changes how your code reads. Cleaner models, more declarative controllers, configuration that lives where it belongs. This is the direction PHP itself is heading, and Laravel is leading the adoption.


Resources

laravel 13 php laravel AI SDK PHP Attributes PHP
مقالات أخرى
تواصل على واتساب