تفاصيل العمل

@php $workType = $item->work_type ?? 'image'; @endphp
{{-- ── Cover image (always shown for all types) ── --}} @if($item->logo && !str_contains($item->logo, 'default-image.png')) @if($workType === 'image') {{ $item->title }} - صورة الغلاف @else
{{ $item->title }} - صورة الغلاف
@endif @endif {{-- ══════════════════════════════════════════ --}} {{-- ── YouTube embed ── --}} {{-- ══════════════════════════════════════════ --}} @if($workType === 'youtube' && $item->link) @php preg_match( '/(?:youtube\.com\/(?:watch\?(?:.*&)?v=|embed\/|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/', $item->link, $ytMatches ); $videoId = $ytMatches[1] ?? null; @endphp @if($videoId)
@else {{-- Fallback if video ID can't be parsed --}} مشاهدة الفيديو على YouTube @endif {{-- ══════════════════════════════════════════ --}} {{-- ── Audio player ── --}} {{-- ══════════════════════════════════════════ --}} @elseif($workType === 'audio') @php $audioMedia = $item->getMedia('audios')->last(); $audioUrl = null; if ($audioMedia) { $audioPath = storage_path('app/public/' . $audioMedia->id . '/' . $audioMedia->file_name); $audioUrl = file_exists($audioPath) ? asset('storage/' . $audioMedia->id . '/' . $audioMedia->file_name) : $audioMedia->getUrl(); } @endphp @if($audioUrl)
{{-- تحميل الملف الصوتي --}}
@endif {{-- ══════════════════════════════════════════ --}} {{-- ── PDF viewer ── --}} {{-- ══════════════════════════════════════════ --}} @elseif($workType === 'pdf') @php $pdfMedia = $item->getMedia('pdfs')->last(); $pdfUrl = null; if ($pdfMedia) { $pdfPath = storage_path('app/public/' . $pdfMedia->id . '/' . $pdfMedia->file_name); $pdfUrl = file_exists($pdfPath) ? asset('storage/' . $pdfMedia->id . '/' . $pdfMedia->file_name) : $pdfMedia->getUrl(); } @endphp @if($pdfUrl) @endif {{-- ══════════════════════════════════════════ --}} {{-- ── Image gallery (default) ── --}} {{-- ══════════════════════════════════════════ --}} @else @foreach($item->getMedia('images') as $media) @php $imgPath = storage_path('app/public/' . $media->id . '/' . $media->file_name); $imgUrl = file_exists($imgPath) ? asset('storage/' . $media->id . '/' . $media->file_name) : $media->getUrl(); @endphp {{ $item->title }} - صورة {{ $loop->iteration }} @endforeach @endif
{{-- end .work-desc --}} {{-- Hidden fancybox entries for other portfolio works (image type only) --}} @if(isset($allPortfolioWorks) && $allPortfolioWorks->isNotEmpty()) @endif

وصف العمل

{!! format_text($item->description) !!}

تواريخ العمل

تاريخ النشر: {{\Carbon\Carbon::parse($item->created_at)->locale(app()->getLocale())->translatedFormat('d F Y')}}
@if($item->finish_date)
تاريخ الإنجاز: {{\Carbon\Carbon::parse($item->finish_date)->locale(app()->getLocale())->translatedFormat('d F Y')}}
@endif
@if($item->skills->isNotEmpty())

@lang('Skills') المستخدمة في العمل

@foreach($item->skills as $skill) {{ $skill->name }} @endforeach
@endif
@php $isLiked = auth()->check() && $item->isFavoritedBy(auth()->id()); @endphp
@if(count($commonItems) > 0)

أعمال آخرى لـ {{ $user->first_name }} {{ $user->last_name }}

@foreach($commonItems as $item)
@include('front.user.gallery._work_card')
@endforeach
@endif