Commit a2c075bd authored by Taylor Otwell's avatar Taylor Otwell Committed by GitHub

Merge pull request #3894 from adamwathan/53-precomputed-hash

Use precomputed hash instead of bcrypt in ModelFactory
parents 26895386 34357105
......@@ -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),
];
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment