database/factories/EmployeeFactory.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()
    {
        $user = User::pluck('id') ->toArray();
        return [
            'user_id' => $this->faker->randomElement($user),
            'first_name' => $this->faker->text(50),
            'last_name' => $this->faker->text(50),
            'phone_number' => $this->faker->phoneNumber(20),
            'email_adderss' => $this->faker->email(50),
            'id_passport_number' => $this->faker->text(50),
            'city' => $this->faker->text(50),
            'address' => $this->faker->text(50),
            'start_date' => $this->faker->date(50),
            'gender' => $this->faker->text(50)
        ];
    }
public function definition ( ) { $ user = User :: pluck ( 'id' ) -> toArray ( ) ; return [ 'user_id' => $ this -> faker -> randomElement ( $ user ) , 'first_name' => $ this -> faker -> text ( 50 ) , 'last_name' => $ this -> faker -> text ( 50 ) , 'phone_number' => $ this -> faker -> phoneNumber ( 20 ) , 'email_adderss' => $ this -> faker -> email ( 50 ) , 'id_passport_number' => $ this -> faker -> text ( 50 ) , 'city' => $ this -> faker -> text ( 50 ) , 'address' => $ this -> faker -> text ( 50 ) , 'start_date' => $ this -> faker -> date ( 50 ) , 'gender' => $ this -> faker -> text ( 50 ) ] ; }
Define the model's default state.
Define the model ' s default state .