12-05-2026 admin, Panel Displays

This commit is contained in:
Kevin Adametz 2026-05-12 18:28:38 +02:00
parent 0762e3beac
commit 6a65354f4c
43 changed files with 3273 additions and 410 deletions

View file

@ -0,0 +1,51 @@
<?php
namespace Database\Factories;
use App\Models\Display;
use App\Models\DisplayPlaylist;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @template TModel of \App\Models\DisplayPlaylist
*
* @extends \Illuminate\Database\Eloquent\Factories\Factory<TModel>
*/
class DisplayPlaylistFactory extends Factory
{
/**
* @var class-string<TModel>
*/
protected $model = DisplayPlaylist::class;
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'display_id' => Display::factory(),
'status' => DisplayPlaylist::STATUS_PUBLISHED,
'published_at' => now(),
'published_by' => null,
'notes' => null,
];
}
public function draft(): static
{
return $this->state(fn () => [
'status' => DisplayPlaylist::STATUS_DRAFT,
'published_at' => null,
'published_by' => null,
]);
}
public function published(): static
{
return $this->state(fn () => [
'status' => DisplayPlaylist::STATUS_PUBLISHED,
'published_at' => now(),
]);
}
}