I use Form Requests to incapsulate validation logic into files then to use it like:
public function register(RegisterRequest $request) {}
When validation is false it redirects to the index page.
How to return json with http code instead redirection?
>Solution :
From postman, you have to pass Accept as application/json on header tab
