New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

raditzfarhan/laravel-sortable

Just a simple sortable behaviour for your Laravel and Lumen eloquent model.
209
Install
composer require raditzfarhan/laravel-sortable
Latest Version:v1.0.0
License:MIT
Last Updated:May 5, 2020
Links: GitHub  ·  Packagist
Maintainer: raditzfarhan

License styleci

Laravel Sortable

Just a simple sortable behaviour for your Laravel and Lumen eloquent model.

Installation

Via Composer

$ composer require raditzfarhan/laravel-sortable:^1.0

Usage

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';
}

Credits

License

MIT. Please see the license file for more information.

Related Packages

laraditz/saring

A simple eloquent model filter.

136 0
spatie/eloquent-sortable

Sortable behaviour for eloquent models

30,662,898 1,517
shiftonelabs/laravel-cascade-deletes

Adds application level cascading deletes to Eloquent Models.

901,465 165
ittest-dev/eloquent-sortable

Sortable behaviour for eloquent models

10,249 0
johankladder/eloquent-sortable

Sortable behaviour for eloquent models

1,089 0

Version History

Version Released License
v1.0.0 MIT