Feelo Best
Feelo Best

Reputation: 91

Class path.config does not exist - Lumen 5.2

i have a little problem while adding GoogleMaps Package By alexpechkarev link : https://alexpechkarev.github.io/google-maps/ to lumen framework version 5.2 I added the ServiceProvider and Facade to my app.php :

$app->register(GoogleMaps\ServiceProvider\GoogleMapsServiceProvider::class);

class_alias(GoogleMaps\Facade\GoogleMapsFacade::class, 'GoogleMaps');

but when, I go to my command line and tape : php artisan I get this error message :

[ReflectionException] Class path.config does not exist

Upvotes: 5

Views: 5043

Answers (1)

Mike McLin
Mike McLin

Reputation: 3637

It is trying to resolve path.config from the IoC container, but it hasn't been defined.

Somewhere before you register your GoogleMapsServiceProvider, you need to add that value to your container.

$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');

Upvotes: 14

Related Questions