@php if(isset($event_id)){ $event=getter('event')->setLang(app()->getLocale())->condition('id',$event_id)->get(); } @endphp @extends('layouts.main',[ 'compact'=>'compact' ]) @if(isset($event) && isset($event->id)) @section('title') {{$event->label}} | {{env('APP_NAME')}} @endsection @section('content')
{{$event->label}}
{{--
--}} {{-- {{date_format(date_create($event->created_at),'d-M-Y')}}--}} {{--
--}}
{!! $event->description !!}
@if(count($event->artists)>0)
{{__('texts.artists')}}
@foreach($event->artists as $artist)
@if(isset($artist->name)) {{$artist->name}} @endif
@if(isset($artist->job)) {{$artist->job}} @endif
@include('includes.plus')
@if(isset($artist->description)) {{$artist->description}} @endif
@endforeach
@endif @if(count($event->gallery)) @endif @if(count($event->partners)>0)
{{__('texts.partners')}}
@foreach($event->partners as $partner)
@endforeach
@endif @php // uploaded video has priority over the youtube link $uploadedVideo = null; $uploadedVideoType = null; $allowedVideoExtensions = ['mp4' => 'video/mp4', 'webm' => 'video/webm', 'ogv' => 'video/ogg', 'ogg' => 'video/ogg', 'mov' => 'video/mp4', 'm4v' => 'video/mp4']; $uploadedExtension = strtolower($event->extension_video_upload ?? ''); if (!empty($event->video_upload) && array_key_exists($uploadedExtension, $allowedVideoExtensions)) { $uploadedVideo = $event->video_upload; $uploadedVideoType = $allowedVideoExtensions[$uploadedExtension]; } // youtube link is used only when there is no valid uploaded video $youtubeVideo = (empty($uploadedVideo) && !empty($event->video)) ? $event->video : null; $videoCover = null; if (!empty($event->extension_video_cover) && isset($event->video_cover->image)) { $videoCover = $event->video_cover->image; } // fall back on the youtube thumbnail only when we are actually showing a youtube video if (empty($videoCover) && !empty($youtubeVideo)) { $ytId = null; $parsedVideo = parse_url($youtubeVideo); if (!empty($parsedVideo['query'])) { parse_str($parsedVideo['query'], $videoQuery); $ytId = $videoQuery['v'] ?? null; } if (empty($ytId) && !empty($parsedVideo['path'])) { $ytId = trim($parsedVideo['path'], '/'); } if (!empty($ytId)) { $videoCover = 'https://i.ytimg.com/vi/'.$ytId.'/mqdefault.jpg'; } } @endphp @if(!empty($uploadedVideo) || !empty($youtubeVideo))
{{__('texts.video')}}
{!! $event->video_description !!}
@endif
@endsection @endif