All checks were successful
Tests / Laravel tests (pull_request) Successful in 3m31s
32 lines
882 B
PHP
32 lines
882 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Education>
|
|
*/
|
|
class EducationFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
$startDate = fake()->dateTimeBetween('-8 years', '-2 years');
|
|
|
|
return [
|
|
'opleiding' => fake()->randomElement(['HBO-ICT', 'Software Engineering', 'Applicatieontwikkeling']),
|
|
'instituut' => fake()->company(),
|
|
'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,
|
|
]);
|
|
}
|
|
}
|