Using a Custom Database Seeder Class In Laravel
One issue that I encountered when using a custom database seeder class was the class not being autoloaded when I ran php artisan db:seed. I kept getting "[ReflectionException] Class SongsTableSeeder does not exist" error.
The solution was very simple. Composer needs to be told to regenerate the autoload files. This can be easily accomplished using the following command: composer dump-autoload
Once the autoload files are regenerated go ahead and run:
php artisan db:seed