Hello, I need to pass several defines to a route, for example admin, annual plan, and new-user, when I put can in the middleware it only identifies the first parameter.
AuthServiceProvider.php
Gate::define("new-user","App\Policies\ACLChecker@checkerNewUser");
Gate::define("plano-anual","App\Policies\ACLChecker@checkerPlanoAnual");
Gate::define("admin","App\Policies\ACLChecker@checkerAdmin");
web.php
Route::get('/home', 'HomeController@index')->middleware("can:plano-anual,new-user,admin");
Debug:
Gate::after(function ($user, $ability, $result, $arguments) {
//
dd($user->plano, $ability, $result, $arguments);
});