Files
bogazici-api/database/factories/StoryFactory.php
2026-03-27 10:41:54 +03:00

30 lines
805 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace Database\Factories;
use App\Models\Story;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Story>
*/
class StoryFactory extends Factory
{
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'title' => fake()->sentence(4),
'badge' => fake()->randomElement(['Tanıtım', 'Yeni Dönem', null]),
'content' => fake()->paragraphs(2, true),
'image' => null,
'cta_text' => fake()->randomElement(['Detaylı Bilgi', 'Hakkımızda', null]),
'cta_url' => fake()->randomElement(['/kurumsal/hakkimizda', '/egitimler', null]),
'order_index' => fake()->numberBetween(0, 10),
'is_active' => true,
];
}
}