How to make requests with Postman


Hi, I'm trying to make requests with Postman but I do not know what else to put in.

of This form is how I consult the data to visualize them in a Vue component, and it verifies if the request is Json.

but I'm also using it as an api to access from ionic. It shows it, but for testing purposes. with postman he is not in that condition and he sends me the eror that I put there. 404:

I know that everything works, but I still do not have all the ionic app to do the tests, so I need to first try them in postman. to verify that you are giving me correct data.

public function GetRedes()
	   return request()->wantsJson() ? Network::Buscar()->get() : abort(404);
asked by Alex Burke Cooper 14.11.2018 в 03:08

1 answer


I know two ways.

  • Add a exception to the web kernel middleware:

    class VerifyCsrfToken extends BaseVerifier {     / **      * The URIs that should be excluded from CSRF verification.      *      * @var array       /     protected $ except = [         'api / ',     ]; }

  • Using API routes instead of web routes.

  • That is, instead of using the router that is in routes / web.php for your webservice, use routes / api.php.

    answered by 14.11.2018 в 19:14