Is it a way to run a code before route execution in Laravel 5?
Actually, when I put some code in my api.php
file exactly before a route definition, It works, but I want to do this with something like a middleware and assign it to a group of routes for example.
I mean blow code result is exactly what I want but I don't want to put my codes in api.php
or web.php
.
Needs to say, the middlewares execute after routes initialization.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire