mercredi 13 juillet 2016

Class HttpClient does not exist : Laravel 5.2.37

My class is below

class RoleServiceProvider extends \Illuminate\Support\ServiceProvider {

    public function register() {
        $this->app->bind('App\Classes\Contract\Role\IRole', function($app){
            return new \App\Classes\BusinessLogic\Role\RoleBL($app['HttpClient']);
        });
    }

    public function provides() {
        return ['App\Classes\Contract\Role\IRole'];
    }
}

Error Details are below. Am I missing something

enter image description here

When I printed the $app, it gave following details

Application {#3 ▼
  #basePath: "C:\xampp\htdocs\Learning"
  #hasBeenBootstrapped: true
  #booted: true
  #bootingCallbacks: []
  #bootedCallbacks: array:1 [▶]
  #terminatingCallbacks: []
  #serviceProviders: array:23 [▶]
  #loadedProviders: array:23 [▶]
  #deferredServices: array:86 [▶]
  #monologConfigurator: null
  #databasePath: null
  #storagePath: null
  #environmentPath: null
  #environmentFile: ".env"
  #namespace: "App\"
  #resolved: array:34 [▶]
  #bindings: array:42 [▶]
  #instances: array:30 [▶]
  #aliases: array:62 [▶]
  #extenders: []
  #tags: []
  #buildStack: array:1 [▶]
  +contextual: []
  #reboundCallbacks: array:2 [▶]
  #globalResolvingCallbacks: []
  #globalAfterResolvingCallbacks: []
  #resolvingCallbacks: array:1 [▶]
  #afterResolvingCallbacks: array:1 [▶]
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire