Closed jonagoldman closed 8 years ago
@jonagoldman Personaly, in my Handler.php file i use the response object like this
$response = app(\EllipseSynergie\ApiResponse\Contracts\Response::class);
if ($e instanceof ValidatorException) {
return $response->errorWrongArgsValidator($e->errors());
};
Thanks will try it out!
Now that the
api()
macro is deprecated, I want to know how to return a response from Laravel's exception handler (Exceptions/Handler).In the past, I used something like this
How can I avoid using
api()
?ps: sorry for not using the guidelines.