@props(['instructor']) @php $imageUrl = asset('images/avatar.jpg'); if (isset($instructor) && $instructor->image) { $localPath = 'images/instructors/' . $instructor->image; if (Storage::disk('public')->exists($localPath)) { $imageUrl = asset('storage/images/instructors/' . $instructor->image); } } @endphp merge(['src' => $imageUrl, 'alt' => sprintf('Image of %s', $instructor->name)]) }}>