ldc-legaulois/database/factories/ProfessionFactory.php

35 lines
901 B
PHP
Raw Permalink Normal View History

2024-03-27 18:32:30 +01:00
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class ProfessionFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
2024-04-04 14:19:53 +02:00
$jobsList = [];
$jobListAmount = fake()->numberBetween(1, 5);
for ($jj = 1; $jj <= $jobListAmount; $jj++) {
2024-03-27 18:32:30 +01:00
array_push($jobsList, [
'value' => fake()->words(5, true),
]);
}
return [
2024-04-04 14:19:53 +02:00
'title' => fake()->firstName,
'picture' => '',
2024-03-27 18:32:30 +01:00
'picture_alt' => fake()->words(8, true),
'picture_title' => fake()->words(5, true),
2024-03-27 18:32:30 +01:00
'jobs_list' => $jobsList,
'job_url' => fake()->url(),
2024-03-27 18:32:30 +01:00
'published' => fake()->boolean(75),
];
}
}