src/models/AngelModel.php
public static function boot()
	{
		parent::boot();

		// Assign input to the columns()
		static::saving(function($model) {
			if ($model->skipEvents) return;
			$model->assign();
		});

		static::creating(function($model) {
			if ($model->reorderable) {
				$model->order = $model->count();
			}
		});

		// Fill in the `order` gap after deleting a model.
		static::deleted(function($model) {
			if (!$model->reorderable) return;
			$order = 0;
			foreach ($model->orderBy('order')->get() as $object) {
				$object->order = $order++;
				$object->save();
			}
		});
	}
public static function boot()
	{
		parent::boot();

		// Assign input to the columns()
		static::saving(function($model) {
			if ($model->skipEvents) return;
			$model->assign();
		});

		static::creating(function($model) {
			if ($model->reorderable) {
				$model->order = $model->count();
			}
		});

		// Fill in the `order` gap after deleting a model.
		static::deleted(function($model) {
			if (!$model->reorderable) return;
			$order = 0;
			foreach ($model->orderBy('order')->get() as $object) {
				$object->order = $order++;
				$object->save();
			}
		});
	}
/////////////////////////////////////////////