samedi 31 décembre 2016

Laravel rest API middleware

I have a rest API where a lot of routes will be prefixed by /org/{id}. This prefix will scope the nested data and also the user will need to be checked if they are a member of the org. Would middleware be the best place to run these checks and also initialise an orgcontext class that can be accessed throughout the rest of the request?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire