Skip to content

Commit

Permalink
Merge pull request #4 from darmen/master
Browse files Browse the repository at this point in the history
Add more user-friendly error message
  • Loading branch information
michielkempen authored Apr 22, 2019
2 parents 34f13f5 + d2dadc9 commit e85dfd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/OrderFieldRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __invoke(NovaRequest $request)
$model = $request->findModelOrFail($resourceId);

if (!$model instanceof Sortable) {
abort(500);
abort(500, "Model should implement " . Sortable::class . " interface");
}

$direction = $request->get('direction');
Expand All @@ -28,4 +28,4 @@ public function __invoke(NovaRequest $request)
$model->moveOrderDown();
}
}
}
}

0 comments on commit e85dfd7

Please sign in to comment.