Skip to content

The publication for web craftspeople Friday, 27 November 2026

Back-end

Laravel 13.44 Adds Model Lookups to Form Requests, Plus PHP 8.6 Support

Laravel 13.44, released on November 25, 2026, adds three methods that resolve an Eloquent model straight from a Form Request. The release also fixes PHP 8.6 deprecations and introduces a PostgreSQL lock built for concurrent inserts.

Laravel 13.44 : la méthode model() simplifie les Form Requests, PHP 8.6 pris en charge

Laravel 13.44 shipped on November 25, 2026. The most visible framework change in this release adds three methods to Form Requests for resolving an Eloquent model directly from a request identifier, without going through the service container or route model binding. The release also fixes deprecations introduced by PHP 8.6, released a few days earlier, and adds a PostgreSQL lock built for concurrent inserts.

Three methods to go from a request field to a model

Until now, resolving a model from an ID posted in a Form Request meant writing a manual lookup, plus handling the case where the ID is missing or invalid. Laravel 13.44 adds three methods to the FormRequest class: model(), modelOrFail() and models().

class UpdateProjectRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'user_id' => ['required', 'integer'],
            'tag_ids' => ['array'],
        ];
    }

    public function handle()
    {
        // guesses App\Models\User from the "user_id" key
        $user = $this->model('user_id', User::class);       // User|null
        $user = $this->modelOrFail('user_id', User::class); // User, or ModelNotFoundException

        // "tag_ids" (plural) resolves a collection
        $tags = $this->models('tag_ids', Tag::class);       // Collection
    }
}

The model class is optional: Laravel guesses it from the field name, so user_id and user_ids both resolve to App\Models\User with no extra configuration. A quick follow-up fix (PR #62576) made model() and modelOrFail() ignore array input instead of attempting an incorrect lookup.

A dedicated lock for concurrent inserts on PostgreSQL

On PostgreSQL, lockForUpdate() also blocks the lock taken by foreign key checks, which can stall or deadlock the insertion of child rows while a parent row is locked. The new query builder method lockForNoKeyUpdate() avoids that contention. On MySQL, SQLite and SQL Server, it behaves exactly like lockForUpdate().

Other changes worth knowing about

ChangeWhat it does
DB::whenTransactionRunsLongerThan()Fires a callback once a transaction exceeds a given duration, after the outermost transaction commits or rolls back.
--schema-only optionOn migrate and migrate:fresh, loads the schema dump without replaying the migrations that usually follow it — useful in tests.
copyToDisk() / moveToDisk()Now accept an options array (visibility, S3 headers); a plain string is read as the visibility.
distinct validationFaster on large arrays.
Redis cacheWrites and deletes are now pipelined.

PHP 8.6: the deprecations that got fixed

PHP 8.6 removed the SORT_LOCALE_STRING flag and the strcoll() function. Laravel 13.44 removes the framework’s internal use of both and fixes a validator trimming behavior that relied on the old flag. Applications still on PHP 8.2 through 8.5 aren’t affected by this fix, which only prepares compatibility with the new version.

The automatic lookup in model() assumes the field is named xxx_id or xxx_ids and that the matching model lives in App\Models. Outside that convention, pass the class as the second argument, as shown above.

The model() method guesses the Eloquent class from the field name, with no extra configuration to write.

What to remember

Laravel 13.44 doesn’t change the framework’s architecture, but it trims a bit more boilerplate that every Form Request used to rewrite on its own. The one thing worth checking after upgrading: the PHP 8.6 deprecation fixes, which only matter to projects that jumped straight to it.

I spend a fair amount of time writing small private methods in my Form Requests just to load the model behind a user_id or a project_id. It was never hard, just repetitive — exactly the kind of detail Laravel eventually absorbs into the framework. lockForNoKeyUpdate() feels more structurally important to me: I’ve seen a client deployment freeze on that exact PostgreSQL lock during a child-row import, and nobody understood why until we dug into the logs. — Simon Janvier

Further reading: the full rundown of 13.44 on Laravel News, which links every merged pull request.

This release lands two weeks after the string of security fixes shipped in 13.43, and just days after the release of PHP 8.6, whose deprecations it now addresses.

Read next