1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated to laravel 5.5

Closes #590
This commit is contained in:
Dan Brown
2017-11-19 15:56:06 +00:00
parent 65579214e2
commit 873b1099f8
23 changed files with 3371 additions and 2697 deletions

View File

@ -103,4 +103,16 @@ class Handler extends ExceptionHandler
return redirect()->guest('login');
}
/**
* Convert a validation exception into a JSON response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Validation\ValidationException $exception
* @return \Illuminate\Http\JsonResponse
*/
protected function invalidJson($request, ValidationException $exception)
{
return response()->json($exception->errors(), $exception->status);
}
}