Laravel 13: AI, Attributes, Passkeys

Published 3/22/2026
Laravel 13: AI, Attributes, Passkeys
Laravel 13: AI, Attributes, Passkeys

The wait is over for the Laravel community. Released on March 17, 2026, Laravel 13 isn't just another incremental update—it marks a fundamental shift in how the framework interacts with Artificial Intelligence and modern PHP syntax.

While Laravel 12 was dubbed "boring" (in a good, stable way), Laravel 13 is undeniably "expressive." Here is a deep dive into the features that define this release.

1. The Dawn of "Agent-Ready" Development

The headline feature of Laravel 13 is the First-Party Laravel AI SDK. This isn't just a wrapper for OpenAI; it’s a unified interface for text generation, tool-calling agents, embeddings, and even image/audio synthesis.

// New first-party AI syntax
use Laravel\Ai\Image;

$image = Image::of('A futuristic cyberpunk city in the rain')
    ->generate();

2. Attribute-First Architecture

Laravel 13 officially moves away from "property-heavy" models and toward PHP 8 Attributes. You can now define model behavior, middleware, and even queue settings directly above the class or method.

The New Way: Instead of defining $fillable or $hidden as protected arrays inside the class, you can now do this:

#[Table('users')]
#[Fillable(['name', 'email'])]
#[Hidden(['password'])]
class User extends Authenticatable {
    // Cleaner class body
}

3. Real-Time Revolution: Reverb + Database

Previously, scaling real-time features with Laravel Reverb required a Redis server. Laravel 13 introduces a Database Driver for Reverb, allowing you to run live notifications and WebSockets directly on your existing SQL database.

This is a game-changer for smaller applications or "boring" stacks that want to keep infrastructure costs at zero.

4. Security: Native Passkey Support

Laravel 13 makes passwords optional. It ships with native Passkey (FIDO2) authentication in its starter kits (Breeze and Jetstream).

  • Bio-Auth: Users can log in using TouchID, FaceID, or Windows Hello.
  • Phishing-Proof: Since no passwords are sent over the wire, credential-stuffing attacks become a thing of the past.

5. Performance & Quality of Life

  • PHP 8.3 Requirement: By dropping support for PHP 8.2, Laravel 13 leverages newer engine optimizations and cleaner internal code.
  • Cache touch(): A long-requested feature, Cache::touch('key', $seconds) allows you to extend the expiration of a cache item without fetching it first.
  • Failover Queue Driver: If your primary Redis queue goes down, Laravel 13 can automatically reroute jobs to a database or SQS backup.
  • JSON:API Resources: First-party support for returning responses that strictly follow the JSON:API specification.
Loading...