#Gate::allows() returns true although it always returns false
3 messages · Page 1 of 1 (latest)
Perhaps you have a Gate::before() registered? https://laravel.com/docs/11.x/authorization#intercepting-gate-checks
3 messages · Page 1 of 1 (latest)
Hi, I have set up a Gate
Gate::define('gate-handle', function () {
return false;
});
but when checking it in Controller, I always get true returned:
dd(Gate::allows('gate-handle'));
dump: true
Is there anything Im missing out? Thanks!
Perhaps you have a Gate::before() registered? https://laravel.com/docs/11.x/authorization#intercepting-gate-checks