develop
Last change
on this file since d795fa6 was d795fa6, checked in by Berat Kjufliju <kufliju@…>, 3 years ago |
added validation to blades
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[120759b] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace Database\Factories;
|
---|
| 4 |
|
---|
| 5 | use App\Models\User;
|
---|
| 6 | use Carbon\Carbon;
|
---|
| 7 | use Illuminate\Database\Eloquent\Factories\Factory;
|
---|
| 8 |
|
---|
| 9 | class UserFactory extends Factory
|
---|
| 10 | {
|
---|
| 11 | /**
|
---|
| 12 | * The name of the factory's corresponding model.
|
---|
| 13 | *
|
---|
| 14 | * @var string
|
---|
| 15 | */
|
---|
| 16 | protected $model = User::class;
|
---|
| 17 |
|
---|
| 18 | /**
|
---|
| 19 | * Define the model's default state.
|
---|
| 20 | *
|
---|
| 21 | * @return array
|
---|
| 22 | */
|
---|
| 23 | public function definition()
|
---|
| 24 | {
|
---|
| 25 | return [
|
---|
| 26 | 'name' => $this->faker->firstName(),
|
---|
| 27 | 'surname' => $this->faker->lastName(),
|
---|
| 28 | 'username' => $this->faker->userName(),
|
---|
| 29 | 'password' => $this->faker->password(),
|
---|
| 30 | 'email' => $this->faker->email(),
|
---|
[d795fa6] | 31 | 'phone_number' => $this->faker->phoneNumber(),
|
---|
[120759b] | 32 | 'role_id' => $this->faker->numberBetween(1, 2),
|
---|
| 33 | 'is_online' => $this->faker->boolean,
|
---|
| 34 | 'is_confirmed' => $this->faker->boolean,
|
---|
| 35 | 'is_forgot_password' => $this->faker->boolean,
|
---|
[d795fa6] | 36 | 'created_by' => "1",
|
---|
[120759b] | 37 | 'created_at' => Carbon::now()
|
---|
| 38 | ];
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.