This commit is contained in:
Adrian Hopek
2022-01-26 10:56:25 +01:00
parent 026bfe485f
commit f3559930c2
28 changed files with 1015 additions and 31 deletions

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Toby\Enums\VacationType;
use Toby\Models\User;
class VacationRequestFactory extends Factory
{
public function definition(): array
{
return [
"user_id" => User::factory(),
"type" => $this->faker->randomElement(VacationType::cases()),
"from" => $this->faker->date,
"to" => $this->faker->date,
"comment" => $this->faker->boolean ? $this->faker->paragraph() : null,
];
}
}