VANA/VANA-php/routes/web.php

27 lines
611 B
PHP
Raw Normal View History

2024-10-11 08:02:45 +02:00
<?php
2024-10-11 11:20:39 +02:00
use App\Models\Episode as EpisodeModel;
2024-10-11 08:02:45 +02:00
use App\Subtitles as AppSubtitles;
use Illuminate\Support\Facades\Route;
2024-10-18 17:47:20 +02:00
use Wikidata\Wikidata;
use App\Models\Episode;
2024-10-11 08:02:45 +02:00
Route::get('/', function () {
2024-10-18 17:47:20 +02:00
$episodes = Episode::all();
return view('list', ['episodes' => $episodes]);
});
Route::get('/detail/{id}', function(int $id) {
$ep = Episode::find($id);
$title = $ep->title;
$subtitles = $ep->subtitles;
$mediacomposition = json_decode($ep->mediacomposition, 1);
2024-10-11 08:02:45 +02:00
2024-10-18 17:47:20 +02:00
return view('detail', ['title' => $title, 'subtitles' => $subtitles, 'mediacomposition' => $mediacomposition]);
2024-10-11 08:02:45 +02:00
});