expressolivretools / database / factories / UserFactory.php @ ab2f5151
Histórico | Ver | Anotar | Baixar (541 Bytes)
1 | 3e379cec | Alexandre Correia | <?php
|
---|---|---|---|
2 | |||
3 | namespace Database\Factories; |
||
4 | |||
5 | use App\Models\User; |
||
6 | use Illuminate\Database\Eloquent\Factories\Factory; |
||
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 = User::class; |
||
16 | |||
17 | /**
|
||
18 | * Define the model's default state.
|
||
19 | *
|
||
20 | * @return array
|
||
21 | */
|
||
22 | public function definition() |
||
23 | { |
||
24 | return [
|
||
25 | 'name' => $this->faker->name, |
||
26 | 'email' => $this->faker->unique()->safeEmail, |
||
27 | ]; |
||
28 | } |
||
29 | } |