]> BookStack Code Mirror - bookstack/blob - database/factories/Auth/UserFactory.php
Update verify-totp.blade.php
[bookstack] / database / factories / Auth / UserFactory.php
1 <?php
2
3 namespace Database\Factories\Auth;
4
5 use Illuminate\Database\Eloquent\Factories\Factory;
6 use Illuminate\Support\Str;
7
8 class UserFactory extends Factory
9 {
10     /**
11      * The name of the factory's corresponding model.
12      *
13      * @var string
14      */
15     protected $model = \BookStack\Auth\User::class;
16
17     /**
18      * Define the model's default state.
19      *
20      * @return array
21      */
22     public function definition()
23     {
24         $name = $this->faker->name;
25
26         return [
27             'name'            => $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,
33         ];
34     }
35 }