[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'LaravelLocalization' not found

composer install 或者 php artisan 遇到:

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'LaravelLocalization' not found

解决办法:
composer install –no-scripts
首先在路由里面注释掉这两句:

'prefix' => LaravelLocalization::setLocale(),
'middleware' => ['localeSessionRedirect', 'localizationRedirect']

运行composer update
然后执行:php artisan config:cache
去掉注释即可

你可能感兴趣的:(laravel)