Quando executo o php artisan db: seed , estou recebendo o seguinte erro:
[ReflectionException] Class SongsTableSeeder does not exist
O que está acontecendo?
Minha classe DatabaseSeeder:
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->call('SongsTableSeeder');
}
}
Classe My SongsTableSeeder:
<?php
// Composer: "fzaninotto/faker": "v1.4.0"
use Faker\Factory as Faker;
use Illuminate\Database\Seeder;
use DB;
class SongsTableSeeder extends Seeder {
public function run()
{
$faker = Faker::create();
$songs = [];
foreach(range(1, 10) as $index)
{
$songs[] = ['title' => $faker->words(rand(1,4))];
}
DB::table('songs')->insert($songs);
}
}
SongsTableSeeder
definição de classe?
composer dump-autoload
?