mercredi 2 mai 2018

How to allow access to a route if one of two middlewares pass?

I have routes that can be accessed by regular users or business users.

Regular users' middleware is: jwt.auth and for business users: auth:business_api. I'd like to have certain routes accessible by both users or business_users like this:

Route::group(['prefix' => 'business', 'middleware' => ['auth:business_api', 'jwt.auth']], function ());

However, this way, both middlewares must pass, I need one or the other.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HIg3kX
via IFTTT

Aucun commentaire:

Enregistrer un commentaire