33 lines
718 B
PHP
33 lines
718 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Employee;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class EmployeeFactory extends Factory
|
|
{
|
|
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Employee::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'matricule' => $this->faker->bothify('?????-#####'),
|
|
'firstname' => $this->faker->firstName(),
|
|
'lastname' => $this->faker->lastName(),
|
|
'email' => $this->faker->unique()->email(),
|
|
'password' => 'password'
|
|
];
|
|
}
|
|
}
|