| Package Data | |
|---|---|
| Maintainer Username: | raditzfarhan |
| Maintainer Contact: | raditzfarhan@gmail.com (Raditz Farhan) |
| Package Create Date: | 2020-04-21 |
| Package Last Update: | 2020-05-05 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-03 15:18:48 |
| Package Statistics | |
|---|---|
| Total Downloads: | 209 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Just a simple sortable behaviour for your Laravel and Lumen eloquent model.
Via Composer
$ composer require raditzfarhan/laravel-sortable:^1.0
Add the Sortable trait to your model:
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use RaditzFarhan\LaravelSortable\Sortable;
class Post extends Model
{
use Sortable;
// The ordering column in your table. Default to `sort_order`.
// No need to set this if your ordering column name is `sort_order`.
protected $sortable = 'ordering';
}
MIT. Please see the license file for more information.