source: database/factories/UserFactory.php@ 5d1a1f3

develop
Last change on this file since 5d1a1f3 was 4b7e2d3, checked in by beratkjufliju <kufliju@…>, 3 years ago

bug fixes, edited export, added fileSeeder for DB testing

  • Property mode set to 100644
File size: 1.1 KB
Line 
1<?php
2
3namespace Database\Factories;
4
5use App\Models\User;
6use Carbon\Carbon;
7use Illuminate\Database\Eloquent\Factories\Factory;
8
9class 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->unique()->userName(),
29 'password' => $this->faker->password(),
30 'email' => $this->faker->unique()->email(),
31 'phone_number' => $this->faker->phoneNumber(),
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,
36 'created_by' => "1",
37 'created_at' => now()
38 ];
39 }
40}
Note: See TracBrowser for help on using the repository browser.