Merge pull request #3894 from adamwathan/53-precomputed-hash
Use precomputed hash instead of bcrypt in ModelFactory
This commit is contained in:
commit
a2c075bd30
|
@ -12,10 +12,12 @@
|
|||
*/
|
||||
|
||||
$factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||
static $password;
|
||||
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->safeEmail,
|
||||
'password' => bcrypt(str_random(10)),
|
||||
'password' => $password ?: $password = bcrypt('secret'),
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue