Download the PHP package c6digital/laravel-orderable without Composer
On this page you can find all versions of the php package c6digital/laravel-orderable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download c6digital/laravel-orderable
More information about c6digital/laravel-orderable
Files in c6digital/laravel-orderable
Package laravel-orderable
Short Description Straightforward ordering for Laravel models.
License MIT
Homepage https://github.com/c6digital/laravel-orderable
Informations about the package laravel-orderable
Straightforward ordering for Laravel models.
This package provides a simple Orderable
trait that you can implement on your Eloquent models. It registers a couple of scopes that allow you to order models and also handles re-ordering models after creation.
Installation
You can install the package via Composer:
Usage
Register the Orderable
trait on your model.
The default column is
order
, so make sure you add that to your database table. The package doesn't do it for you automatically.
Use the ordered()
, orderedAsc()
and orderedDesc()
methods to order results in a query.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Ryan Chandler
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-orderable with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0