# Changelog

All notable changes to `eloquent-sortable` will be documented in this file

## 4.2.0 - 2024-02-26

### What's Changed

* Bump stefanzweifel/git-auto-commit-action from 4 to 5 by @dependabot in https://github.com/spatie/eloquent-sortable/pull/162
* Support laravel 11 by @mokhosh in https://github.com/spatie/eloquent-sortable/pull/171
* bump min laravel 9 version to support ignore timestamps by @mokhosh in https://github.com/spatie/eloquent-sortable/pull/173

**Full Changelog**: https://github.com/spatie/eloquent-sortable/compare/4.1.1...4.2.0

## 4.1.1 - 2024-02-06

### What's Changed

* Fix typo in eloquent-sortable.php by @dissto in https://github.com/spatie/eloquent-sortable/pull/168
* Add ignore timestamp by @mokhosh in https://github.com/spatie/eloquent-sortable/pull/169

### New Contributors

* @dissto made their first contribution in https://github.com/spatie/eloquent-sortable/pull/168
* @mokhosh made their first contribution in https://github.com/spatie/eloquent-sortable/pull/169

**Full Changelog**: https://github.com/spatie/eloquent-sortable/compare/4.1.0...4.1.1

## 4.0.2 - 2023-01-23

### What's Changed

- Update readme about publishing config file by @patrickbrouwers in https://github.com/spatie/eloquent-sortable/pull/120
- Add Dependabot Automation by @patinthehat in https://github.com/spatie/eloquent-sortable/pull/136
- Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/spatie/eloquent-sortable/pull/137
- Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/eloquent-sortable/pull/138
- Laravel 10 support by @Okipa in https://github.com/spatie/eloquent-sortable/pull/142

### New Contributors

- @patrickbrouwers made their first contribution in https://github.com/spatie/eloquent-sortable/pull/120
- @dependabot made their first contribution in https://github.com/spatie/eloquent-sortable/pull/137
- @Okipa made their first contribution in https://github.com/spatie/eloquent-sortable/pull/142

**Full Changelog**: https://github.com/spatie/eloquent-sortable/compare/4.0.1...4.0.2

## 4.1.0 - 2023-01-24

- add support for Laravel 10
- drop support for Laravel 8
- drop support for PHP 8.0

## 4.0.1 - 2022-01-21

- support Laravel 9

## 4.0.0 - 2021-03-21

- require PHP 8+
- drop support for all PHP 7.x versions
- use PHP 8 syntax

## 3.11.0 - 2021-01-18

- add methods to determine whether element is the last or first in order (#102)

## 3.10.0 - 2020-11-25

- add support for PHP 8.0
- drop support for Laravel 5.8

## 3.9.0 - 2020-09-16

- add config file

## 3.8.3 - 2020-09-08

- add support for Laravel 8

## 3.8.2 - 2020-07-08

- reduce dependency tree (#89)

## 3.8.1 - 2020-06-26

- models don't always have an id as key, use `getKey` instead

## 3.8.0 - 2020-03-02

- add support for Laravel 7

## 3.7.0 - 2019-09-04

- add support for Laravel 6

## 3.6.0 - 2019-04-01

- allow `setNewOrder` to accept a custom sort column

## 3.5.0 - 2019-02-27

- drop support for L5.7 and below, PHP 7.1 and PHPUnit 7

## 3.4.4 - 2019-02-27

- add support for Laravel 5.8

## 3.4.3 - 2018-08-24

- add support for Laravel 5.7

## 3.4.2 - 2018-02-08

- add support for L5.6
- drop support for anything lower that L5.5

## 3.4.1

- fix deps

## 3.4.0

- add compatibility with Laravel 5.5

## 3.3.0 - 2017-04-16

- add `buildSortQuery()`

## 3.2.1 - 2017-01-23

- release without changes. Made to kickstart Packagist.

## 3.2.0 - 2017-01-23

- add compatibility with Laravel 5.4

## 3.1.0 - 2016-11-20

- added support for `SoftDeletes`

## 3.0.0 - 2016-10-22

- removed the need for a service provider
- some cleanup

## 2.3.0 - 2016-10-19

- added support for collections passed to `setNewOrder`

## 2.2.0 - 2016-10-19

- added `moveToStart`, `moveToEnd` and `swapOrder`

## 2.1.1 - 2016-03-21

- Fixed a bug in `moveOrderUp` (see #13)

## 2.1.0

- Added `moveOrderUp`- and `moveOrderDown`-methods

## 2.0.1

- Fixed typehinting on scope

## 2.0.0

- SortableInterface is now Sortable
- Sortable is now SortableTrait
- getHighestOrderNumber() now retrieves the highest existing order number (not a new one)
- setHighestOrderNumber() no longer requires a Sortable object parameter
- sort_when_creating option
- Added shouldSortWhenCreating function
- Added test coverage

## 1.1.2

- Removed typehinting on scope in interface.

## 1.1.1 (non-functional version!)

- Removed typehinting on scope

## 1.1.0

- Added an argument to `setNewOrder` to specify the starting order
- Adopted psr-2 and psr-4
