Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 652
Feelo Best Avatar asked Aug 15 '16 19:08

Feelo Best


1 Answers

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');
like image 156
Mike McLin Avatar answered Sep 29 '22 18:09

Mike McLin