mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
add model,controller,migration,api
This commit is contained in:
@@ -48,6 +48,14 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
{
|
||||
// This will replace our 404 response with
|
||||
// a JSON response.
|
||||
if ($exception instanceof ModelNotFoundException) {
|
||||
return response()->json([
|
||||
'error' => 'Resource not found'
|
||||
], 404);
|
||||
}
|
||||
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user