database/factories/UserFactory.php
/**
     * Define the model's default state.
     *
     * @return array
     */
Define the model's default state.
@return array
Define the model ' s default state . @return array
public function definition()
    {
        $gender = $this->faker->randomElement(['male', 'female']);
        return [
            'name'               => $this->faker->name(),
            'email'              => $this->faker->unique()->safeEmail(),
            'bio'                => $this->faker->realText($maxNbChars = 50, $indexSize = 2),
            'email_verified_at'  => now(),
            'gender'             => $gender,
            'type'               => 'user',
            'date_of_birth'      => $this->faker->date('Y-m-d', $max = 'now'),
            'active_since'       => $this->faker->date('Y-m-d', $max = 'now'),
            'status'             => 1,
            'password'           => Hash::make('password'),
            'remember_token'     => Str::random(10),
        ];
    }
public function definition ( ) { $ gender = $ this -> faker -> randomElement ( [ 'male' , 'female' ] ) ; return [ 'name' => $ this -> faker -> name ( ) , 'email' => $ this -> faker -> unique ( ) -> safeEmail ( ) , 'bio' => $ this -> faker -> realText ( $ maxNbChars = 50 , $ indexSize = 2 ) , 'email_verified_at' => now ( ) , 'gender' => $ gender , 'type' => 'user' , 'date_of_birth' => $ this -> faker -> date ( 'Y-m-d' , $ max = 'now' ) , 'active_since' => $ this -> faker -> date ( 'Y-m-d' , $ max = 'now' ) , 'status' => 1 , 'password' => Hash :: make ( 'password' ) , 'remember_token' => Str :: random ( 10 ) , ] ; }
Define the model's default state.
Define the model ' s default state .