All checks were successful
Tests / Laravel tests (pull_request) Successful in 2m36s
35 lines
875 B
PHP
35 lines
875 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WorkExperience>
|
|
*/
|
|
class WorkExperienceFactory extends Factory
|
|
{
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
$startDate = fake()->dateTimeBetween('-8 years', '-1 year');
|
|
|
|
return [
|
|
'werkgever' => fake()->company(),
|
|
'functie' => fake()->jobTitle(),
|
|
'startdatum' => $startDate->format('Y-m-d'),
|
|
'einddatum' => fake()->dateTimeBetween($startDate, 'now')->format('Y-m-d'),
|
|
'beschrijving' => fake()->sentence(),
|
|
];
|
|
}
|
|
|
|
public function current(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'einddatum' => null,
|
|
]);
|
|
}
|
|
}
|