One seeder class is working but other is not working, do you know why?
I have created two seeder classes ‘UsersTableSeeder” and “Conferences TableSeeder”. When the command “php artisan db:seed
” is executed it appears:
Seeding: UsersTableSeeder
But the ConferenceTableSeeder don’t work. Do you know why can be?
UsersTableSeeder:
class UsersTableSeeder extends Seeder
{
public function run()
{
AppUser::create([
'name' => 'John',
'email' => '',
'password' => bcrypt('password')
]);
}
}
ConferencesTableSeeder
class ConferencesTableSeeder extends Seeder
{
public function run()
{
AppEvent::create([
'name' => 'Test name',
'description' => '',
'date' => '2018-03-08 06:30:00',
...
]);
}
}
from Laravel Questions and Answers https://laravelquestions.com/laravel/one-seeder-class-is-working-but-other-is-not-working-do-you-know-why/
via Lzo Media
No comments:
Post a Comment