php artisan migrate
got this errors:
PHP Fatal error: Uncaught ReflectionException: Class path.storage does not exist in C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Container\Container.php:752
Stack trace:
#0 C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Container\Container.php(752): ReflectionClass->__construct('path.storage')
#1 C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Container\Container.php(631): Illuminate\Container\Container->build('path.storage')
#2 C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Container\Container.php(586): Illuminate\Container\Container->resolve('path.storage', Array)
#3 C:\xampp\htdocs\lumen\iq-api\vendor\laravel\lumen-framework\src\Application.php(230): Illuminate\Container\Container->make('path.storage', Array)
#4 C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(110): Laravel\Lumen\Application->make('path.storage', Array)
#5 C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Fo in C:\xampp\htdocs\lumen\iq-api\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 752
In my case (lumen 5.3.3) got fixed by adding following lines right after $app definition in
bootstrap/app.php
file:$app = new Laravel\Lumen\Application(
realpath(__DIR__ . '/../')
);
$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');
$app->instance('path.storage', app()->basePath() . DIRECTORY_SEPARATOR . 'storage');
//$app->withFacades();
$app->withEloquent();
Summery is only add following two lines,
$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');
$app->instance('path.storage', app()->basePath() . DIRECTORY_SEPARATOR . 'storage');
No comments:
Post a Comment