axn / laravel-database-extension
Extension of the database section of the Laravel framework
Installs: 2 282
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/axn/laravel-database-extension
Requires
- php: ^8.4
- laravel/framework: ^12.0
Requires (Dev)
- driftingly/rector-laravel: ^2.0.5
- laravel/pint: ^1.22.1
- rector/rector: ^2.0.17
README
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.