我收到错误:Call to a member function define() on null
这是我的代码:
$factory->define(App\User::class, function (Faker $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});
答案 0 :(得分:-1)
得到答案我只需要包含html表单别名和包..