Zum Inhalt springen

Laravel Release Notes

Einträge
733
Quellen
4
Zuletzt aktualisiert

Folge Laravel, um die Release Notes in deinen Feed zu holen.

Laravel

Konversationsliste über HasConversations-Trait abrufbar

Ein neuer HasConversations-Trait für das User-Model stellt eine Eloquent-Beziehung zu Konversationen bereit, wobei updated_at mit neuen Nachrichten fortgeschrieben wird.

Pull request by @barryvdh

Building a conversation history sidebar previously meant writing raw SQL against the agent_conversations table. A new HasConversations trait for your User model exposes a proper Eloquent relationship, with updated_at advancing as messages arrive so ordering by recency just works.

class User extends Authenticatable
{
    use HasConversations;
}

$conversations = $request->user()
    ->conversations()
    ->latest('updated_at')
    ->paginate(20);

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

BroadcastAgent sendet stream_failed-Event bei Fehlern

Schlägt ein BroadcastAgent-Job mit einer unbehandelten Exception fehl, wird nun über den failed()-Hook ein stream_failed-Event gesendet, damit Clients den Fehler anzeigen und einen neuen Versuch ermöglichen können.

Pull request by @sumaiazaman

When a BroadcastAgent job threw an unhandled exception, the frontend had no signal that the stream had failed - leaving the user staring at a spinner indefinitely. A stream_failed event is now broadcast via the job's failed() hook so clients can surface the error and let users retry.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Stringable-Makro toAudio für Text-to-Speech

Über das neue Makro toAudio lässt sich aus jeder Stringable-Instanz direkt Sprache erzeugen, optional mit Provider, Voice, Instructions, Model und Timeout.

Pull request by @nhedger

Text-to-speech is now a fluent one-liner from any Stringable instance:

$response = Str::of('Hello world')->toAudio(timeout: 45);

// With more control
$response = Str::of('Hello world')->toAudio(
    provider: Lab::ElevenLabs,
    voice: 'alloy',
    instructions: 'Speak slowly',
    model: 'custom-model',
    timeout: 45,
);

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

passwordrules-Attribut in Passwortfeldern der Starter Kits

Alle Felder für neue Passwörter in den Starter Kits (Registrierung, Zurücksetzen, Aktualisieren) enthalten nun ein passwordrules-Attribut, damit Passwortmanager gleich ein passendes Passwort erzeugen.

Pull request by @joetannenbaum

Every new-password input across the starter kits - register, reset password, and update password pages - now includes a passwordrules attribute derived from Password::defaults()->toPasswordRulesString(). Password managers can generate a compliant password on the first try rather than failing against validation after the fact.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Laravel MCP: ResourceLink-Inhaltstyp (Spec 2025-06-18)

Laravel MCP unterstützt jetzt den Inhaltstyp resource_link der MCP-Spezifikation, der statt eingebettetem Inhalt einen URI-Verweis liefert und auch aus einer deklarierten Resource-Klasse erzeugt werden kann.

Pull request by @rupeshstha

Laravel MCP now supports the resource_link content type from the MCP spec. Unlike embedded resources that inline content, a resource link returns a URI pointer that the client fetches or subscribes to independently - better suited for large payloads, generated artifacts, and live subscriptions.

Response::resourceLink(
    uri: 'file:///data/report.json',
    name: 'monthly-report',
    mimeType: 'application/json',
    title: 'Monthly Sales Report',
    size: 2048,
);

Resource links can also be built from a declared Resource class, inheriting its URI, name, description, and MIME type - with optional overrides:

Response::resourceLink(WeatherForecastResource::class, title: 'Custom Title');

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Pao: Umgebungsvariable PAO_FORCE

Die neue Umgebungsvariable PAO_FORCE=1 aktiviert PAO unabhängig von der Agent-Erkennung, was etwa Tests in Docker-Containern vereinfacht.

Pull request by @antonkomarev

Running tests inside Docker means agent environment variables often don't propagate into the container. A new PAO_FORCE=1 env var force-enables PAO regardless of agent detection, so you can drop it into a docker compose run command without enumerating every possible agent marker in your compose config.

docker compose run --rm -e PAO_FORCE=1 app vendor/bin/pest

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Passkeys: runWith() deaktiviert alle Agents

Der Testhelfer runWith() deaktiviert während der Testausführung nun alle Agents statt nur Claude Code.

Pull request by @cosmastech

The runWith() testing helper now correctly disables all agents during test execution, not just Claude Code. Previously, other agents could still interfere with test runs.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Reverb: $hidden, $visible und $appends in Model-Komponenten berücksichtigt

Ranger berücksichtigt bei den generierten Typen nun die Eloquent-Eigenschaften $hidden, $visible und $appends, sodass die Struktur der tatsächlich serialisierten Ausgabe entspricht.

Pull request by @joetannenbaum

Eloquent's $hidden, $visible, and $appends properties now influence the types Ranger generates. Previously, the generated TypeScript could include attributes that would never appear in a serialized response, or miss custom appended accessors entirely. The resolved shape now matches what Eloquent actually serializes.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Surveyor: Inertia-Spezial-Prop-Typen werden aufgelöst

Surveyor löst bei den Inertia-Wrappern defer, optional, lazy, always und merge nun den inneren Typ aus dem Callback auf und markiert defer, optional und lazy als optional.

Pull request by @joetannenbaum

Inertia's defer, optional, lazy, always, and merge prop wrappers were previously falling through to reflection, which returned the wrapper class itself rather than the actual type inside. Surveyor now resolves the inner type directly from each wrapper's callback. defer, optional, and lazy are marked as optional since those props may not be present in the initial response.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Surveyor: @var-Docblocks überschreiben abgeleiteten Typ bei Array-Einträgen

Ein @var-Docblock direkt vor einem Array-Eintrag überschreibt in Surveyor nun den abgeleiteten Typ, ohne dass umgebender Code geändert werden muss.

Pull request by @JasBogans

Static analysis can't always follow deep Collection pipelines or SQL aliases down to a precise shape. A @var docblock placed immediately before an array item now overrides the inferred type, giving you an exact local escape hatch without changing any surrounding code.

return Inertia::render('Authors/createOrEdit', [
    'author' => $author,
    /** @var list<array{value:int,label:string}> */
    'categories' => Category::query()->orderBy('name')->get()
        ->map(fn (Category $c) => ['value' => $c->id, 'label' => $c->name])
        ->values()->all(),
]);

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Debounceable Queued Jobs

Queued Jobs lassen sich mit dem Attribut #[DebounceFor] oder direkt beim Dispatch so debouncen, dass innerhalb eines Zeitfensters nur der letzte Dispatch ausgeführt wird, und für ersetzte Jobs wird ein JobDebounced-Event ausgelöst.

Pull request by @matthewnessworthy

Bursty workloads finally have a clean answer. Debounceable jobs keep only the last dispatch in a window, so a user editing the same document ten times in thirty seconds triggers a single rebuild instead of ten. Apply the #[DebounceFor] attribute to any queued job, or debounce at the call site without touching the class:

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\Attributes\DebounceFor;

#[DebounceFor(30)]
class RebuildSearchIndex implements ShouldQueue
{
    public function __construct(public int $documentId) {}

    public function debounceId(): string
    {
        return (string) $this->documentId;
    }

    public function handle(): void
    {
        SearchIndex::rebuild($this->documentId);
    }
}

Where ShouldBeUnique keeps the first dispatch and rejects the rest, debouncing flips that around so the most recent dispatch always wins. A JobDebounced event fires for any superseded job if you want to track it. Read more in the queue documentation.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Health-Route liefert JSON

Die eingebaute Health-Route /up gibt nun JSON zurück, wenn die Anfrage dies verlangt, während Statuscodes und die Blade-Seite für Browser unverändert bleiben.

Pull request by @WendellAdriel

API-only apps can stop scraping HTML from /up. The built-in health route now returns JSON when the request asks for it, which makes load balancers, uptime monitors, and orchestrators a lot happier:

{ "status": "Application is up" }

Status codes stay the same, and browser requests still get the existing Blade page. No config required.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Neuer JsonFormatter für Exception-Kontext

Der neue Illuminate\Log\Formatters\JsonFormatter übernimmt context()-Daten benutzerdefinierter Exceptions, auch aus verketteten Vorgänger-Exceptions, in strukturierte Logs.

Pull request by @cosmastech

Exception context is one of those things you only realize you needed after staring at production logs for hours. The new Illuminate\Log\Formatters\JsonFormatter ensures context() data on your custom exceptions actually shows up in structured logs, including context from previous exceptions in a chain. Wire it up in config/logging.php:

'formatter' => Illuminate\Log\Formatters\JsonFormatter::class,

Now an exception like this carries its enriched context all the way through to the log entry:

class MyException extends \RuntimeException
{
    public function context(): array
    {
        return [
            'luke' => 'cosmastech',
            'taylor' => 'taylorotwell',
        ];
    }
}

Whether the exception is sent through report() or written via Log::error() with an exception key, the structured payload now includes everything you put on the exception itself.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: prefersJsonResponses() im Application Builder

Mit prefersJsonResponses() in bootstrap/app.php werden breite Accept-Header als JSON behandelt, explizite text/html-Anfragen bleiben unberührt und der ursprüngliche Wert steht in X-Original-Accept.

Pull request by @WendellAdriel

Building an API and tired of curl requests coming back as HTML? One line in bootstrap/app.php now treats broad Accept headers as JSON, so auth redirects, validation errors, and exception pages all serialize properly for clients that didn't ask for HTML:

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
    )
    ->prefersJsonResponses()
    ->create();

Clients that explicitly request text/html are left alone, and the original Accept value is preserved on X-Original-Accept if you need it for logging. Default behavior is unchanged unless you opt in.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Unterstützung für Cloudflare Email Service

Laravel unterstützt den Cloudflare Email Service nun als Mailer, konfigurierbar über account_id und token in config/services.php.

Pull request by @dwightwatson

Cloudflare's Email Service joins the list of first-class mailers in Laravel. Drop your credentials into config/services.php:

'cloudflare' => [
    'account_id' => env('CLOUDFLARE_ACCOUNT_ID'),
    'token' => env('CLOUDFLARE_TOKEN'),
],

Then point your mailer at it and send like usual. Same Symfony HTTP Client setup the existing transports use, so there's nothing new to learn.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Redis-Cluster-Unterstützung für Queue und ConcurrencyLimiter

Laravels Redis-Queue und ConcurrencyLimiter versehen Queue-Namen bei Cluster-Verbindungen automatisch mit Hash-Tags, was CROSSSLOT-Fehler vermeidet, und der PhpRedis-Cluster-Connector unterstützt zudem ACL-Authentifizierung sowie Retry/Backoff.

Pull request by @timmylindh

If you've ever fought a CROSSSLOT error on AWS ElastiCache Serverless or any Redis Cluster setup, this one is for you. Laravel's Redis queue and ConcurrencyLimiter now wrap queue names in hash tags automatically when they detect a cluster connection, so all related keys land on the same slot:

queues:{default}            -> slot for "default"
queues:{default}:delayed    -> slot for "default"
queues:{default}:reserved   -> slot for "default"
queues:{default}:notify     -> slot for "default"

Different queues still distribute across the cluster, the same pattern Sidekiq and BullMQ use. The PhpRedis cluster connector also picks up ACL auth and retry/backoff parity with standalone connections, which matters during ElastiCache scaling events. Standalone users see zero change. The full breakdown is in the queue documentation.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Laravel 13.x: Queue-Methoden zum Inspizieren von Jobs

Die Queue-Facade bietet mit pendingJobs(), delayedJobs() und reservedJobs() neue Methoden, die InspectedJob-Collections mit uuid, Jobname, Versuchen und Erstellzeit liefern, und die mit Redis und Database funktionieren.

Pull request by @jackbayliss

Three new methods on the Queue facade let you peek at what is actually sitting on your queues without reaching for DB::table() and decoding payloads by hand:

Queue::pendingJobs();
Queue::delayedJobs();
Queue::reservedJobs();

Each returns a collection of InspectedJob instances exposing the uuid, job name, attempts, and creation time. That opens up some genuinely useful patterns:

Queue::reservedJobs('high-priority-queue')->first()->name;
// => 'App\Jobs\SendEmail'

Queue::pendingJobs()->countBy('name');
// => ['App\Jobs\SendEmail' => 1842, 'App\Jobs\ProcessOrder' => 43]

Perfect for deployment scripts that need to wait for specific jobs to finish, dashboards, and ad-hoc debugging. Works with the Redis and Database drivers; other drivers return an empty collection.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel Framework von Laravel

Strict Mode für Form Requests im Laravel-Framework

Mit FormRequest::failOnUnknownFields() schlägt die Validierung fehl, wenn eingehende Felder nicht in rules() deklariert sind, und einzelne Requests können sich per Eigenschaft $failOnUnknownFields = false ausnehmen.

Pull request by @NurullahDemirel

Strict mode lands in form requests, mirroring the spirit of Model::shouldBeStrict(). Flip it on in your AppServiceProvider and any incoming field that isn't declared in rules() will fail validation instead of silently slipping through:

use Illuminate\Foundation\Http\FormRequest;

public function boot(): void
{
    FormRequest::failOnUnknownFields(! app()->isProduction());
}

Need to opt a single request out (say, a public webhook with unpredictable payloads)? Set the property on the class:

class PublicWebhookRequest extends FormRequest
{
    protected ?bool $failOnUnknownFields = false;

    public function rules(): array { /* ... */ }
}

It's fully backward compatible, off by default, and a great safety net during development. Learn more in the validation documentation.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

useHttp: onHttpException, onNetworkError und Response in onSuccess

Der useHttp-Hook in Inertia erhält die Callbacks onHttpException und onNetworkError sowie ein zweites Argument für onSuccess mit der rohen HttpResponse, verfügbar in den React-, Vue- und Svelte-Adaptern.

Pull request by @pascalbaljet

The useHttp hook gets the same error callbacks Inertia visits already have. No more wrapping calls in try/catch just to handle a 500 or a dropped connection. There's also a second argument on onSuccess that hands you the raw HttpResponse, so telling a 200 apart from a 204 is now trivial. Available across the React, Vue, and Svelte adapters.

Originalquelle(öffnet in neuem Tab)Problem melden

Laravel

Laravel Nightwatch Plugin für Claude Code und Cursor

Die Einrichtung von Laravel Nightwatch steht als integrierter Skill für Claude Code und Cursor zur Verfügung, installierbar über das Plugin aus dem Marketplace.

Pull request by @pushpak1300

Configuring Laravel Nightwatch is now a built-in skill for both Claude Code and Cursor. Install the plugin from the marketplace and your agent has the steps it needs to wire Nightwatch into your project, no copy-pasting setup instructions from the docs.

Originalquelle(öffnet in neuem Tab)Problem melden