Zum Inhalt springen

Laravel Release Notes

604 Einträge aus 4 Quellen. Zuletzt aktualisiert:

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Inertia: Kleinere und schneller geparste Page-Daten

Optional lassen sich die initialen Inertia-Page-Daten aus einem <script type="application/json">-Element laden, was die Datengröße deutlich reduziert und das Parsen beschleunigt.

Pull request by @bram-pkg

Opt-in support was added for loading the initial Inertia page data from a <script type="application/json"> element instead of the body tag. This results in a greatly reduced initial page data size, faster parsing, and makes the initial page data a breeze to inspect with your browser's dev tools.

You can opt in to this behavior as follows:

createInertiaApp({
    // ...
    defaults: {
        future: {
            useScriptElementForInitialPage: true,
        },
    },
});

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Boost: Unterstützung für once()-Props

Mit Inertia::once markierte Props werden vom Client gespeichert und auf folgenden Seiten mit derselben Prop wiederverwendet, statt in jeder Response erneut übertragen zu werden.

Pull request by @pascalbaljet

Some data rarely changes, is expensive to compute, or is simply large. Rather than including this data in every response, once props are remembered by the client and reused on subsequent pages that include the same prop.

return Inertia::render('Billing', [
    'plans' => Inertia::once(fn () => Plan::all()),
]);

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Echo: Resource und Prompts für Paket-Guidelines

Boost lädt Guidelines nur noch für aktiv genutzte Pakete, wodurch der globale Kontext kleiner bleibt, Tokens effizienter genutzt werden und mehr Platz für anwendungsspezifische Informationen bleibt.

Pull request by @pushpak1300

Previously, all third-party package guidelines needed to be added to the global context, which could grow unbounded as more packages were integrated.

Boost is now reducing global context bloat by adding guidelines for only actively used packages that are loaded, thereby improving token efficiency and leaving room for more application-specific information.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

MCP: Typableitung für Event-Payloads

Event-Payloads werden aus dem Broadcast-Event automatisch abgeleitet, wenn eine Modul-Override-Datei vorhanden ist, was useEcho vereinfacht und manuelle Typpflege reduziert.

Pull request by @joetannenbaum

Event payloads are now automatically inferred from the broadcast event if the user provides a module override file, resulting in a cleaner useEcho experience and less type management for the user.

import { App } from "./types";

declare module "@laravel/echo-react" {
    interface Events {
        ".App.Events.UserCreated": {
            user: App.Models.User;
        };
        ".App.Events.OrderShipped": {
            order: App.Models.Order;
            user: App.Models.User;
        };
    }
}

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

MCP: Unterstützung für Completion

Das MCP-Paket unterstützt nun das MCP-Completion-Utility, womit Server IDE-ähnliche Vervollständigungsvorschläge für Prompt-Argumente und Resource-Template-Variablen liefern können.

Pull request by @pushpak1300

Support was added for the MCP completion utility, allowing servers to provide IDE-like autocompletion suggestions for prompt arguments and resource template variables.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

MCP: Annotationen für Resources

Für Resource-Klassen stehen jetzt die Annotationen audience, priority und lastModified gemäß MCP-Spezifikation zur Verfügung, mit denen Server Clients Hinweise zur Nutzung oder Darstellung geben können.

Pull request by @pushpak1300

Three annotation types are now available for use with Resource classes: audience, priority, and lastModified. This adheres to the MCP specs and allows the server to provide hints to clients about how to use or display the resource.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

VS Code Extension: structuredContent und outputSchema

Das MCP-Paket unterstützt jetzt Output-Schemas und strukturierte Inhalte, was die Integration mit ChatGPT Apps und KI-Clients mit parsebaren Tool-Ergebnissen verbessert.

Pull request by @macbookandrew

Support for output schemas and structured content was added to the MCP package, enabling better integration with ChatGPT Apps and AI clients that need parseable tool results.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

VS Code Extension: Befehl zum Generieren von Namespaces

Die Extension enthält einen neuen Befehl „Generate Namespace“, mit dem sich schnell der korrekte Namespace für eine Klasse erzeugen lässt.

Pull request by @N1ebieski

A new "Generate Namespace" command was added to the extension, allowing the user to quickly generate the correct namespace for a class.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Laravel 12.x: FluentPromise für Http::pool

Mit der neuen FluentPromise lassen sich Aufrufe in Http::pool verketten und beliebige eigene Rückgabewerte statt der ursprünglichen Response erzeugen.

Pull request by @cosmastech

Userland chaining in Http::pool is now possible with the introduction of FluentPromise. Previously, the chain would return the original response, limiting flexibility. With this change, users can access the underlying array and return whatever they wish:

$response = Http::pool(function (Pool $pool) {
    $pool->as('cosmatech')
        ->get('https://cosmastech.com')
        ->then(
            fn ($response) => strlen($response->body())
        );
    $pool->as('laravel')
        ->get('https://laravel.com')
        ->then(
            fn ($response) => strlen($response->body())
        );
});

/*
array:2 [
  "cosmatech" => 9095
  "laravel" => 1422023
]
*/

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Neue Helfer lazy und proxy für PHP Lazy Objects

Laravel Framework 12.x erhält die zwei neuen Helfer lazy und proxy, die die Nutzung von PHPs neuen Lazy Objects komfortabler machen.

Pull request by @timacdonald

Two new helpers, lazy and proxy, were added to make PHP's new lazy objects more ergonomic to use.

<?php

use Illuminate\Support\Facades\Http;
use Vendor\Facades\ResultFactory;
use Vendor\Result;
use function Illuminate\Support\lazy;
use function Illuminate\Support\proxy;

$response = Http::get(...);

$instance = lazy(Result::class, fn () => [$response->json()]);
$instance = proxy(Result::class, fn (): Result => ResultFactory::make($response->json()));

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

Boost: Unterstützung für once()-Props

Mit Inertia::once markierte Props werden vom Client gespeichert und auf folgenden Seiten mit derselben Prop wiederverwendet, statt in jeder Antwort erneut übertragen zu werden.

Pull request by @pascalbaljet

Some data rarely changes, is expensive to compute, or is simply large. Rather than including this data in every response, once props are remembered by the client and reused on subsequent pages that include the same prop.

return Inertia::render('Billing', [
    'plans' => Inertia::once(fn () => Plan::all()),
]);

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel

MCP-Paket: structuredContent und outputSchema unterstützt

Das MCP-Paket unterstützt nun Output Schemas und structured content, was die Integration mit ChatGPT Apps und KI-Clients mit parsebaren Tool-Ergebnissen verbessert.

Pull request by @macbookandrew

Support for output schemas and structured content was added to the MCP package, enabling better integration with ChatGPT Apps and AI clients that need parseable tool results.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Laravel 12.x: Neue Methode daysOfMonth() für den Scheduler

Die neue Methode daysOfMonth() erlaubt es, Aufgaben an mehreren bestimmten Tagen des Monats auszuführen, etwa am 1. und 15.

Pull request by @yousefkadah

Previously, there wasn't a way to schedule tasks on multiple arbitrary days of the month (e.g., 1st, 10th). A daysOfMonth() method was added that allows scheduling tasks to run on multiple specific days of the month with a clean, intuitive API.

$schedule->command('process-payroll')
    ->daysOfMonth(1, 15) // 1st and 15th of each month
    ->timezone('America/New_York');

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Neue Validierungsregel encoding für hochgeladene Dateien

Die neue Validierungsregel encoding prüft per mb_check_encoding(), ob der Inhalt einer Datei oder eines Strings zu einer bestimmten Kodierung passt.

Pull request by @ziadoz

A new encoding validation rule was added that checks the contents of a file or string matches a specific encoding using mb_check_encoding(), ensuring that uploaded files are encoded as expected before processing.

Validator::validate($input, [
    'attachment' => [
        'required',
        File::types(['csv'])->encoding('utf-8'),
    ],
]);

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Neue Interval-Helper-Funktionen in Laravel 12.x

Neue Interval-Helper-Funktionen wie minutes() und now()->plus(hours: 6) erlauben es, die aktuelle Zeit fließend anzupassen.

Pull request by @taylorotwell

New interval helper functions were added for fluently getting the current time with adjustments:

use Illuminate\Support\{ now, minutes }

Cache::put('name', 'Taylor', minutes(5));

Invitation::create([
    'expires_at' => now()->plus(hours: 6),
]);

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Queue-Worker pausieren und fortsetzen

Mit den neuen Artisan-Befehlen queue:pause und queue:continue lässt sich ein Queue-Worker vorübergehend anhalten, ohne ihn zu beenden.

Pull request by @yousefkadah

Sometimes you may need to temporarily prevent a queue worker from processing new jobs without stopping the worker entirely. Now you can with newly added artisan commands:

php artisan queue:pause database:default
php artisan queue:continue database:default

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Neue Blade-Direktive @hasStack

Die neue Direktive @hasStack ermöglicht es, Markup um einen @stack nur dann auszugeben, wenn der Stack nicht leer ist.

Pull request by @browner12

The new @hasStack directive can be used to wrap @stack directives for conditional output depending on if the stack is empty or not. This is useful if you want some markup to wrap the stack only if it is not empty.

@hasStack("list")
<ul>
    @stack("list")
</ul>
@endif

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

route:list mit neuem --middleware-Filter

Der Befehl route:list besitzt jetzt die Option --middleware, mit der sich die Ausgabe nach einer Middleware-Klasse oder Middleware-Gruppe filtern lässt.

Pull request by @jasonmccreary

A --middleware option was added to the route:list command to filter output by middleware. This can be a single middleware class name or a middleware group name, allowing you to easily see routes with the specified middleware applied.

php artisan route:list --middleware=api
php artisan route:list --middleware=ThrottleRequests

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Neuer Testing-Trait WithCachedRoutes

Der neue Testing-Trait WithCachedRoutes speichert die Routen beim Test-Setup statisch in einem Testing\CachedState-Objekt, sodass folgende Tests sie nicht erneut von der Festplatte lesen müssen.

Pull request by @cosmastech

A new testing trait called WithCachedRoutes was introduced. This testing trait stores the routes as a static property within a Testing\CachedState object during test setup, ensuring subsequent tests do not need to read from disk.

Originalquelle(öffnet in neuem Tab)Problem melden

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

Laravel Framework von Laravel

Neue Methode Factory@insert() für Eloquent Factories

Eloquent Factories bieten nun die Methode insert() für Masseneinfügungen von Models, was Tests mit vielen Datensätzen beschleunigt.

Pull request by @cosmastech

The insert() method was added to Eloquent Factories, allowing you to perform a mass insert of models. This increases performance during testing with numerous of database records.

Originalquelle(öffnet in neuem Tab)Problem melden