Laravel 5 Seeder not found

Posted by on December 14, 2014

I tried to create new seeder in Laravel 5 and the seeder class was not found. I douoble checked like 10 times anddid not find what was wrong. Finally I tried “php artisan optimize” and the Seeder start working again!

You can fix it also if you happen to get exception like this:

 exception 'ReflectionException' with message 'Class RouteSeeder does not exist' in /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php:745
 Stack trace:
 #0 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(745): ReflectionClass->__construct('RouteSeeder')
 #1 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(650): Illuminate\Container\Container->build('RouteSeeder', Array)
 #2 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(505): Illuminate\Container\Container->make('RouteSeeder', Array)
 #3 /var/www/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(55): Illuminate\Foundation\Application->make('RouteSeeder')
 #4 /var/www/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(37): Illuminate\Database\Seeder->resolve('RouteSeeder')
 #5 /var/www/resources/database/seeds/DatabaseSeeder.php(17): Illuminate\Database\Seeder->call('RouteSeeder')
 #6 /var/www/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php(57): DatabaseSeeder->run()
 #7 [internal function]: Illuminate\Database\Console\SeedCommand->fire()

Last modified on December 14, 2014

Categories: Laravel
No Comments »

« | Home | »

Leave a Reply

*