app/Providers/AppServiceProvider.php
/**
     * Bootstrap any application services.
     *
     * @return void
     */
Bootstrap any application services.
@return void
Bootstrap any application services . @return void
public function boot()
    {
        Gate::define('isAdmin', function ($user) {
            return $user->role == 1;
        });
        Gate::define('isSubscribedUser', function ($user) {
            return $user->role == 2;
        });
        Gate::define('isNonSubscribedUser', function ($user) {
            return $user->role == 3;
        });
    }
public function boot ( ) { Gate :: define ( 'isAdmin' , function ( $ user ) { return $ user -> role == 1 ; } ) ; Gate :: define ( 'isSubscribedUser' , function ( $ user ) { return $ user -> role == 2 ; } ) ; Gate :: define ( 'isNonSubscribedUser' , function ( $ user ) { return $ user -> role == 3 ; } ) ; }
Bootstrap any application services.
Bootstrap any application services .
/**
         * *Definitions of gate permissions
         */ // define a admin user role  //define a author user role  // define a editor role  //