I would have suggested that same command. In my experience, errors from migrations like come from the composer autoloader in your project. Usually dumping autoloader will rebuild with the new class names added. Also be sure you haven't renamed the file where it doesn't match the class name.
Run
php artisan optimize
and try again.
I've resolved the issues by running the below command:
COMPOSER=composer.json composer dump-autoload
What does COMPOSER=composer.json mean???
You need to first navigate to your project folder, THEN run composer dump-autoload.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community