Created
August 19, 2015 20:06
-
-
Save ismaeltoe/ec616530a7be58315363 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Seeder; | |
use App\User; | |
class UserTableSeeder extends Seeder { | |
public function run() | |
{ | |
$faker = Faker\Factory::create('fr_FR'); | |
for ($i = 0; $i < 10; $i++) { | |
$user = new User; | |
$user->nom = $faker->lastName; | |
$user->prenoms = $faker->firstName; | |
$user->email = $faker->unique()->email; | |
$user->date_naissance = $faker->dateTimeThisCentury->format('Y-m-d'); | |
$user->password = bcrypt('123456'); | |
$user->telephone = $faker->phoneNumber; | |
$user->save(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment