Extensions and improvements to the Database section of Laravel Framework.
- Natural sorting: Sort results naturally (1, 2, 10 instead of 1, 10, 2)
- Default order: Automatically apply sorting on model queries
- Joins using relationships: Perform SQL joins using Eloquent relationships
- whereHasIn: Performant alternative to
whereHas()usingINinstead ofEXISTS - whereLike: Simplified search across multiple columns and relationships
- Extended SoftDeletes:
withoutTrashedExcept()scope
- PHP 8.4+
- Laravel 12+
composer require axn/laravel-database-extensionThe service provider is automatically discovered by Laravel.
Full documentation is available in the docs folder.
See UPGRADE.md for instructions on upgrading between major versions.
This package is open-sourced software licensed under the MIT license.