As soon, I am typing php artisan db:seed
command.
I\'m getting Error Like:
[ReflectionException]
Clas
From my experience, this will show up most of the time when the class you are trying to call has some bugs and cannot be compiled. Check if the class that is not being reflected can be executed at its own.
You need to assign it to a name space for it to be found.
namespace App\Http\Controllers;
try to use following command
php artisan db:seed --class=DatabaseSeeder
A composer dump-autoload
should fix it.
Check your capitalization!
Your host system (Windows or Mac) is case insensitive by default, and Homestead inherits this behavior. Your production server on the other hand is case sensitive.
Whenever you get a ClassNotFound Exception check the following:
If the issue is not resolved by composer dump-autoload
or is not a newly created class.
Check for syntax errors in your class and its traits as well.
In my case, there was a syntax error in a Trait, but ReflectionException
was shown for the actual Class using that Trait instead.