34 lines
901 B
PHP
34 lines
901 B
PHP
<?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
|
|
{
|
|
$jobsList = [];
|
|
$jobListAmount = fake()->numberBetween(1, 5);
|
|
for ($jj = 1; $jj <= $jobListAmount; $jj++) {
|
|
array_push($jobsList, [
|
|
'value' => fake()->words(5, true),
|
|
]);
|
|
}
|
|
|
|
return [
|
|
'title' => fake()->firstName,
|
|
'picture' => '',
|
|
'picture_alt' => fake()->words(8, true),
|
|
'picture_title' => fake()->words(5, true),
|
|
'jobs_list' => $jobsList,
|
|
'job_url' => fake()->url(),
|
|
'published' => fake()->boolean(75),
|
|
];
|
|
}
|
|
}
|