app/Providers/AuthServiceProvider.php
/**
     * Register any authentication / authorization services.
     *
     * @return void
     */
Register any authentication / authorization services.
@return void
Register any authentication / authorization services . @return void
public function boot(Gate $gate)
    {
        $this->registerPolicies();
        $gate->before(function($user){
            return $user->id ==1;
        });
    }
public function boot ( Gate $ gate ) { $ this -> registerPolicies ( ) ; $ gate -> before ( function ( $ user ) { return $ user -> id == 1 ; } ) ; }
Register any authentication / authorization services.
Register any authentication / authorization services .
//