I have two types of guard Embajador y Experto
my problem is that both can have access to similar pages. My problem is that in pages where the two types are allowed, it does not allow me access.
try to use:
function __construct(){
$this->middleware('auth:embajador,experto');
}
This only lets me enter with ambassador but not with an expert and if I put it in reverse it's the same, it leaves me with expert but not with ambassador. p>
Also try to use:
function __construct(){
$this->middleware(['auth:embajador','auth:experto']);
}
and it works only if the first auth is defined. This leads to an initial page but first passes through the authentication middleware, to prevent another user from trying to access.
Does anyone know how I can authorize access to these two types of user to a view?