source: database/factories/UserFactory.php@ 120759b

develop
Last change on this file since 120759b was 120759b, checked in by Berat Kjufliju <kufliju@…>, 3 years ago

added UserFactory, edited html, added delete to departments

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[120759b]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->userName(),
29 'password' => $this->faker->password(),
30 'email' => $this->faker->email(),
31 'mobile_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_at' => Carbon::now()
37 ];
38 }
39}
Note: See TracBrowser for help on using the repository browser.