3 namespace Database\Factories\Auth;
5 use Illuminate\Database\Eloquent\Factories\Factory;
6 use Illuminate\Support\Str;
8 class UserFactory extends Factory
11 * The name of the factory's corresponding model.
15 protected $model = \BookStack\Auth\User::class;
18 * Define the model's default state.
22 public function definition()
24 $name = $this->faker->name;
28 'email' => $this->faker->email,
29 'slug' => \Illuminate\Support\Str::slug($name . '-' . \Illuminate\Support\Str::random(5)),
30 'password' => Str::random(10),
31 'remember_token' => Str::random(10),
32 'email_confirmed' => 1,