Home > OS >  middleware auth with except method dont work for a parameter
middleware auth with except method dont work for a parameter

Time:05-21

My problem is that :

$this->middleware('auth', ['except'=>'getInfos', 'store']);

My getInfos except is working, but the store method dont work, i cant understand why, you can see in the picture below my rout list (in the terminal).

picture of my code here

I searched everywhere for nothing, do you see a difference between store and GetInfos ?

Thanks in advance all !

CodePudding user response:

Should be as a multidimensional array:

$this->middleware('auth', ['except'=> ['getInfos', 'store']]);

Or with better view:

$this->middleware('auth')->except('getInfos', 'store');
  • Related