23-01-2026

This commit is contained in:
Kevin Adametz 2026-01-23 17:33:10 +01:00
parent 07959c0ba2
commit 854ce02bf6
166 changed files with 32909 additions and 1262 deletions

View file

@ -0,0 +1,43 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Models\DisplayVideo;
use App\Models\DisplayFooterContent;
use Illuminate\Http\JsonResponse;
class DisplayConfigController extends Controller
{
/**
* Gibt die Konfiguration für die Display-Seite zurück
*/
public function index(): JsonResponse
{
$videos = DisplayVideo::active()->get()->map(function ($video) {
return [
'src' => $video->full_path,
'position' => $video->position,
];
});
$footerContent = DisplayFooterContent::active()->get()->map(function ($footer) {
$data = [
'headline' => $footer->headline,
'subline' => $footer->subline,
];
// URL nur hinzufügen wenn vorhanden
if ($footer->url) {
$data['url'] = $footer->short_url;
}
return $data;
});
return response()->json([
'videoPlaylist' => $videos,
'footerContent' => $footerContent,
]);
}
}