towhid
611
13
Laravel

Call to undefined method Illuminate\Support\Facades\Gate::before()

Posted 2 months ago by towhid

this is my auth service provide file code

public function boot(Gate $gate)
    {
        // dd($gate);
        $this->registerPolicies();
        $gate->before(function($user){
            return $user->id == 1; //this is admin id 
        });
    }

what the reason it show ?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.