ldc-portsalaries/database/factories/EmployeeFactory.php

34 lines
718 B
PHP
Raw Normal View History

2021-05-08 06:50:19 +02:00
<?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'
];
}
}