@php
$profileImage = null;
if (!empty($user->profile_image)) {
// If stored path is relative, build a public URL; if already absolute, use as-is
$profileImage = \Illuminate\Support\Str::startsWith($user->profile_image, ['http://', 'https://'])
? $user->profile_image
: asset('storage/' . ltrim($user->profile_image, '/'));
}
@endphp
@php
$mediaProfile = $user->getFirstMediaUrl('profile', 'thumb') ?: $user->getFirstMediaUrl('profile');
$profileImage = $mediaProfile ?: $profileImage;
@endphp
@if ($profileImage)
@else
No Image
@endif
-
@foreach ($errors->all() as $error)
- {{ $error }} @endforeach