/** * Run the database seeds. * * @return void */ public function run() { $faker = Faker::create('vi_VN'); for ($i = 0; $i < 100; $i++) { $name = $faker->name; $customer = App\Customer::create(['name' => $name, 'birthday' => $faker->date($format = 'Y-m-d', $max = '-18 years'), 'identity_card_number' => $faker->taxpayerIdentificationNumber, 'company' => $faker->company, 'phone_number' => $faker->phoneNumber, 'email' => $faker->email, 'description' => $faker->text, 'keywords' => $name, 'address' => $faker->address]); } }
public function run() { // Uncomment the below to wipe the table clean before populating DB::table('customers')->delete(); $faker = $this->getFaker(); for ($i = 0; $i < 100; $i++) { $name = $faker->name; $email = $faker->email; $password = Hash::make("password"); App\Customer::create(['email' => $email, 'password' => $password]); } }