Laravel по-русски

Русское сообщество разработки на PHP-фреймворке Laravel.

Ты не вошёл. Вход тут.

#1 17.09.2019 12:48:21

Ошибка при подключении GrahamExceptions

Всем привет. Прошу помощи

Создал новое приложение на L6

rm -rf app2
~/.config/composer/vendor/bin/laravel new app2
cd app2
composer require graham-campbell/exceptions
php artisan vendor:publish --provider="GrahamCampbell\Exceptions\ExceptionsServiceProvider"

В app/Exceptions/Handler.php заменил стандартный ExceptionHandler на
use GrahamCampbell\Exceptions\ExceptionsServiceProvider as ExceptionHandler;

В config/app.php в секцию [providers] добавил
GrahamCampbell\Exceptions\ExceptionsServiceProvider::class,

На php artisan serve получаю ошибку

[www@blank app2]$ php artisan serve
PHP Fatal error:  Uncaught Illuminate\Contracts\Container\BindingResolutionException: Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\Support\ServiceProvider in /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php:994
Stack trace:
#0 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(932): Illuminate\Container\Container->unresolvablePrimitive(Object(ReflectionParameter))
#1 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Container\Container->resolvePrimitive(Object(ReflectionParameter))
#2 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(835): Illuminate\Container\Container->resolveDependencies(Array)
#3 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(682): Illuminate\Container\Container->build('App\\Exceptions\\...')
#4 /home/www/laravel+react/app2/vendor/l in /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 994
PHP Fatal error:  Uncaught Illuminate\Contracts\Container\BindingResolutionException: Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\Support\ServiceProvider in /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php:994
Stack trace:
#0 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(932): Illuminate\Container\Container->unresolvablePrimitive(Object(ReflectionParameter))
#1 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Illuminate\Container\Container->resolvePrimitive(Object(ReflectionParameter))
#2 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(835): Illuminate\Container\Container->resolveDependencies(Array)
#3 /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php(682): Illuminate\Container\Container->build('App\\Exceptions\\...')
#4 /home/www/laravel+react/app2/vendor/l in /home/www/laravel+react/app2/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 994

Изменено AlexPTZ (17.09.2019 13:00:34)

Не в сети

Подвал раздела