An open API service indexing awesome lists of open source software.

https://github.com/yuges-code/laravel-orderable

Order generation for Laravel eloquent models ๐Ÿ“ถ โ†•๏ธ ๐Ÿ”ข
https://github.com/yuges-code/laravel-orderable

laravel orders package php yuges

Last synced: 8 months ago
JSON representation

Order generation for Laravel eloquent models ๐Ÿ“ถ โ†•๏ธ ๐Ÿ”ข

Awesome Lists containing this project

README

          




Build

GitHub Branch Check Runs
GitHub Tests Action Status



Project

GitHub Release
Packagist Downloads
GitHub License
Packagist Stars
Packagist Dependency Version


Quality


Laravel Orderable



๐Ÿ“ถ Order generation for Laravel eloquent models



# ๐Ÿ’ฟ Installation

### โ†’ Composer

You can install the package via composer:

```
composer require yuges-code/laravel-orderable
```

### โ†’ Publishing Config

Publishing the config file (config/orderable.php) is optional:

```
php artisan vendor:publish --provider="Yuges\Orderable\Providers\OrderableServiceProvider" --tag="orderable-configs"
```

### โ†’ Changing Migrations

You need to change the migration to create the order column:

```
$table->unsignedInteger('order')->default(1)->index();
```

or

```
$table->order();
```

### โ†’ Running Migrations

After that, you need to run migrations:

```
php artisan migrate
```


# ๐Ÿงช Running Tests

### โ†’ PHPUnit tests

To run tests, run the following command:

```
composer test
```


# โš–๏ธ License

The MIT License (MIT). Please see [License File](LICENSE) for more information.


# ๐Ÿ™†๐Ÿผโ€โ™‚๏ธ Authors Information

Created in 2025 by:

- [Yuges-code](https://github.com/yuges-code)
- [All Contributors](../../contributors)