1

I am trying to run commands composer update & php artisan serve i got these errors:

PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/Container.php:734
Stack trace:
#0 /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/Container.php(734): ReflectionClass->__construct('log')
#1 /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/Container.php(629): Illuminate\Container\Container->build('log', Array)
#2 /var/www/html/***/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container->make('log', Array)
#3 /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/Container.php(849): Illuminate\Foundation\Application->make('log')
#4 /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/Container.php(804): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/C in /var/www/html/***/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 734

I already checked some solutions i red like spaces in .env but the problem still exists

A.Soliman
  • 315
  • 3
  • 13
  • I got the same error when migrating from laravel 4.2 to 5.1, the error is misleading see https://stackoverflow.com/a/34992628/403999 – Juan Rojas Sep 26 '18 at 20:11

2 Answers2

0

It's a known bug that was fixed in laravel 5.4. Please upgrade your laravel version. https://github.com/laravel/framework/issues/6607

Sami Samiuddin
  • 438
  • 4
  • 8
0

you just need to delete the vendor folder and then try composer install command. or
have you tried composer dump-autoload??

won’t download a thing. It just regenerates the list of all classes that need to be included in the project (autoload_classmap.php). Ideal for when you have a new class inside your project. Ideally, you execute composer dump-autoload -o , for a faster load of your webpages. The only reason it is not default, is because it takes a bit longer to generate (but is only slightly noticable)

M Amir Shahzad
  • 190
  • 2
  • 16