$episodes]); }); Route::get('/detail/{id}', function(int $id) { $ep = Episode::find($id); $title = $ep->title; $subtitles = $ep->subtitles; $mediacomposition = json_decode($ep->mediacomposition, 1); $durationSteps = $mediacomposition['chapterList'][0]['duration'] / 1000 / 10; $subdata = json_decode($ep->subtitle_data, 1); $parser = new Podlove\Webvtt\Parser(); $subtitles = $parser->parse($subtitles); return view('detail', ['title' => $title, 'subtitles' => $subtitles, 'mediacomposition' => $mediacomposition, 'durationSteps' => $durationSteps, 'dom_color' => $ep->viz_data, 'subdata' => $subdata]); });