- PHP 8.3 is now the minimum required version. PHP 8.1 and 8.2 are no longer supported.
- Laravel 12 is now the minimum required version. Laravel 11 is no longer supported.
spatie/laravel-sluggablev4 is now required. Please refer to the spatie/laravel-sluggable upgrade guide for details on upstream breaking changes.
- The
findBySlugmethod signature has been updated to accept an optional third argument?callable $additionalQuery. Existing calls remain backward compatible.
Existing calls to findBySlug continue to work without any changes:
Post::findBySlug('my-first-post');
Post::findBySlug('my-first-post', ['id', 'slug_en']);To further scope the lookup, you may now pass an additional query callback as the third argument:
Post::findBySlug('my-first-post', ['*'], function ($query) {
$query->where('status', 'published');
});See the Finding a model by slug section in the README for more details.