我正在尝试按照http://laravel.com/docs/migrations#database-seding上的说明播种我的数据库:
class DatabaseSeeder extends Seeder {
public function run()
{
$this->call('UserTableSeeder');
$this->command->info('User table seeded!');
}
}
class UserTableSeeder extends Seeder {
public function run()
{
DB::table('users')->delete();
User::create(array('email' => 'foo@bar.com'));
}
}
我对此有点困惑。User
里面有什么User::create(array('email' => 'foo@bar.com'));
?