>D:\Develop\z.study\laravel\blog> php artisan app:name App
Application namespace set!
>D:\Develop\z.study\laravel\blog> php artisan list
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class App\Console\Kernel does not exist' in D:\
Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php:736
Stack trace:
#0 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(736): ReflectionClass
->__construct('App\\Console\\Ker...')
#1 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(626): Illuminate\Cont
ainer\Container->build('App\\Console\\Ker...', Array)
#2 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(674): Illuminate\C
ontainer\Container->make('App\\Console\\Ker...', Array)
#3 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(216): Illuminate\Foun
dation\Application->make('App\\Console\\Ker...', Array)
#4 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(733): Illuminate\Cont
ainer\Co in D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 736
Fatal error: Uncaught exception 'ReflectionException' with message 'Class App\Console\Kernel does not exist' in D:\Devel
op\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php:736
Stack trace:
#0 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(736): ReflectionClass
->__construct('App\\Console\\Ker...')
#1 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(626): Illuminate\Cont
ainer\Container->build('App\\Console\\Ker...', Array)
#2 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(674): Illuminate\C
ontainer\Container->make('App\\Console\\Ker...', Array)
#3 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(216): Illuminate\Foun
dation\Application->make('App\\Console\\Ker...', Array)
#4 D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php(733): Illuminate\Cont
ainer\Co in D:\Develop\z.study\laravel\blog\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 736
Namespace 변경 후 다음과 같은 오류가 발생하면
composer.json에
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/" <<변경해야 할 부분
}
},
이 부분에 psr-4 가 기본 Namespace로 되어 있을 것이다
이 부분은 변경한 네임스페이스로 변경 후
>composer dump-autoload
를 입력해서면 정상 동작 한다.
댓글