parsaaghayi-backend/database/factories/ProjectFactory.php
parsa aghaei bd92c3e3fc initial
2024-09-25 13:05:18 +03:30

31 lines
915 B
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use App\Models\Project;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Project>
*/
class ProjectFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
protected $model = Project::class;
public function definition(): array
{
return [
'title' => $this->faker->sentence,
'category' => $this->faker->randomElement(['Web Design', 'App Design', 'Graphic Design', 'Front End', 'Back End']),
'images' => json_encode([
['src' => $this->faker->imageUrl(), 'position' => 'bottom-[-5px] left-[-5px]', 'zIndex' => 20],
['src' => $this->faker->imageUrl(), 'position' => 'top-[-5px] right-[-5px]', 'zIndex' => 10],
]),
];
}
}