protected function handleOrderable($id, array $input = [])
{
if (array_key_exists('_orderable', $input)) {
$model = $this->model->find($id);
if ($model instanceof Sortable) {
$input['_orderable'] == 1 ? $model->moveOrderUp() : $model->moveOrderDown();
return true;
}
}
return false;
}
For what i see in the Orderable Displayer, you need to require spatie/eloquent-sortable first
composer require spatie/eloquent-sortable
But the code seems to be incomplete. If i manage to arrive to a solution, will post it here.
Most helpful comment
For what i see in the Orderable Displayer, you need to require spatie/eloquent-sortable first
composer require spatie/eloquent-sortableBut the code seems to be incomplete. If i manage to arrive to a solution, will post it here.