vendredi 28 septembre 2018

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

I am using Policy in Laravel 5.6

But getting this Error:

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

How can I resolve this problem?

protected $policies = [
        'App\Model' => 'App\Policies\ModelPolicy',
    ];

and in boot:

public function boot(GateContract $gate)
{
        $this->registerPolicies();

        $gate->define('isAdmin', function ($user){
            return $user->role == 1;
        });
}



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2y65wsb
via IFTTT

Aucun commentaire:

Enregistrer un commentaire