public function render($request, Exception $exception)
{
if($exception instanceof MethodNotAllowedHttpException) {
return $this->jsonResponse(
'NotFound',
'Not Found.',
404
);
}
if($exception instanceof ModelNotFoundException) {
$model = str_replace('App\\Models\\', '', $exception->getModel());
return $this->jsonResponse(
'ModelNotFound',
$model.' not found.',
404);
}