entrust
entrust copied to clipboard
problem with Ability on EntrustUserTrait
Am i the only one have problems checking the Ability of an user?
Im using Laravel 5.1.11 and a resource controller with a construct method using this:
$this->middleware('ability:admin,create_quote,true', ['except' => ['index','show']]);
I get an InvalidArgumentException.
I Believe the problem is with this function:
if (!isset($options['validate_all'])) { $options['validate_all'] = false; } else { if ($options['validate_all'] !== true && $options['validate_all'] !== false) { throw new InvalidArgumentException(); }
If i add 'single quotes' to true and false, everything works fine.
Hi I am facing same issue and fix by overriding ability method