I have the following in my controller:
public function __construct()
{
$this->middleware('contactpermissionschecker', array(
'requiredAccess' => array(
'canEdit' => 1,
'canDelete' => 1,
)
));
}
My problem is that I don't know how to access "canEdit" and "canDelete" in the middleware here:
public function handle(Request $request, Closure $next)
{
print_r($request->requiredAccess);
}
Above I'm just trying to print it out from the request, but that doesn't work. I also tried:
$this->options
But also, not there. Any ideas how to get these variables in middleware?