pp-planer/database/factories/SlideFactory.php
Thorsten Bus 0e3c647cfc feat: probundle export with media, image upscaling, upload dimension warnings
- Fix probundle exports missing images (double slides/ prefix in storage path)
- Replace manual ZipArchive with PresentationBundle + ProBundleWriter from parser plugin
- Add per-agenda-item download route and buttons for songs and slide items
- Remove text layer from image-only slides in .pro generation
- Fix image conversion: upscale small images, black bars on 2 sides max (contain)
- Add upload warnings for non-16:9 and sub-1920x1080 images (German, non-blocking)
- Update SlideFactory and all tests to use slides/ prefix in stored_filename
- Add 11 new tests (agenda download, image conversion, upload warnings)
2026-03-30 10:29:37 +02:00

27 lines
866 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' => 'slides/'.$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'),
];
}
}