@props(['work', 'grid' => '']) @php // HARD STOP: agar work null hai toh kuch render hi mat karo if (!$work) { return; } use Illuminate\Support\Str; // MEDIA URL (external OR storage) $mediaUrl = $work->hero_media ? (Str::startsWith($work->hero_media, ['http://', 'https://']) ? $work->hero_media : asset($work->hero_media)) : null; // Rotating text → always array $rotatingItems = is_array($work->rotating_text) ? $work->rotating_text : json_decode($work->rotating_text ?? '[]', true); @endphp
@if($work->hero_media_type === 'video' && $mediaUrl) @elseif($mediaUrl) {{ $work->title }} @endif
{{-- CLIENT --}} @if($work->client_name)

{{ $work->client_name }}

@endif {{-- TITLE --}}

{{ $work->title }}

{{-- ROTATING TEXT --}}