Fix for API key and start adding a few data factories

This commit is contained in:
Nabeel Shahzad
2017-12-12 20:14:01 -06:00
parent da5523e972
commit b5d2e1ba11
8 changed files with 140 additions and 16 deletions

View File

@@ -0,0 +1,17 @@
<?php
use Faker\Generator as Faker;
$factory->define(App\Models\User::class, function (Faker $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'api_key' => $faker->sha1,
'flights' => $faker->numberBetween(0, 1000),
'flight_time' => $faker->numberBetween(0, 10000),
'remember_token' => str_random(10),
];
});