mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
file request api update
This commit is contained in:
@@ -50,8 +50,16 @@ class Handler extends ExceptionHandler
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
if ($exception instanceof ModelNotFoundException) {
|
||||
if (in_array('application/json', $request->getAcceptableContentTypes())) {
|
||||
return response()->json([
|
||||
'type' => 'error',
|
||||
'message' => "We couldn't find your requested item.",
|
||||
], 404);
|
||||
}
|
||||
|
||||
return response()
|
||||
->redirectTo('/not-found')->setStatusCode(404);
|
||||
->redirectTo('/not-found')
|
||||
->setStatusCode(404);
|
||||
}
|
||||
|
||||
return parent::render($request, $exception);
|
||||
|
||||
Reference in New Issue
Block a user