axn/laravel-database-extension
Laravel Database Extension
Extensions and improvements to the Database section of Laravel Framework.
Features
- 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
Requirements
- PHP 8.4+
- Laravel 12+
Installation
composer require axn/laravel-database-extension
The service provider is automatically discovered by Laravel.
Documentation
Full documentation is available in the docs folder.
Upgrade guide
See UPGRADE.md for instructions on upgrading between major versions.
License
This package is open-sourced software licensed under the MIT license.
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
634,760,849
9,707
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
408,553,772
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
387,976,821
4,658