Auto-formatted by Laravel Pint (default Laravel preset): string concatenation spacing, anonymous class brace placement, constructor body shorthand, import ordering, and assertion indentation.
27 lines
856 B
PHP
27 lines
856 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Service;
|
|
use App\Models\Slide;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class SlideFactory extends Factory
|
|
{
|
|
protected $model = Slide::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'type' => $this->faker->randomElement(['information', 'moderation', 'sermon']),
|
|
'service_id' => Service::factory(),
|
|
'original_filename' => $this->faker->word().'.jpg',
|
|
'stored_filename' => $this->faker->uuid().'.jpg',
|
|
'thumbnail_filename' => $this->faker->uuid().'_thumb.jpg',
|
|
'expire_date' => $this->faker->optional()->dateTimeBetween('now', '+12 months'),
|
|
'uploader_name' => $this->faker->name(),
|
|
'uploaded_at' => $this->faker->dateTimeBetween('-1 month', 'now'),
|
|
];
|
|
}
|
|
}
|