@foreach ($relatedVideos as $index => $relatedVideo) @php $routeParams = [$relatedVideo->id, $relatedVideo->slug]; if (@$plan) { if (!@$playlist->title) { $url = route('video.play', $routeParams) . '?plan=' . @$plan->slug . '&index=' . ($index + 1); } else { $url = route('video.play', $routeParams) . '?list=' . @$playlist->slug . '&index=' . ($index + 1) . '&plan=' . @$plan->slug; } } else { $url = route('video.play', $routeParams) . '?list=' . @$playlist->slug . '&index=' . ($index + 1); } @endphp
@endforeach @push('style') @endpush