samedi 28 mai 2016

Is there anyway to code such that I can define or condition in middleware?

I have three roles in my application. I have a condition in which two roles can access same page. For that I write below code.

in below code, sub plan1 and sub plan 2 are roles.

Route::group(['middleware' => ['web', 'auth', 'SubPlan1', 'SubPlan2']], function () {
    Route::get('/Parent-1-Info', '\ContactInfoController@Parent1Info'));
});

if sub plan1, tries to access the page, I get 404 error because i mentioned both middleware in same group.

Is there anyway to code such that I can define or condition in middleware?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire