Updated Google Avatar, Admin Features, All Pages with small changes, Filters in Publications Page
This commit is contained in:
@@ -87,11 +87,23 @@
|
||||
<label class="form-label fw-semibold">Profile Photo</label>
|
||||
<input type="file" name="profile_photo" class="form-control">
|
||||
|
||||
@if ($profile->profile_photo_path)
|
||||
<div class="mt-2">
|
||||
<img src="{{ Storage::url($profile->profile_photo_path) }}" alt="Profile Photo" width="100" class="rounded shadow-sm">
|
||||
</div>
|
||||
@endif
|
||||
@php
|
||||
$user = auth()->user();
|
||||
$imagePath = $profile->profile_photo_path ?? $user->profile_image;
|
||||
$imageUrl = asset('assets/frontend/images/profile-icon.svg'); // Default
|
||||
|
||||
if ($imagePath) {
|
||||
if (Str::startsWith($imagePath, ['http://', 'https://'])) {
|
||||
$imageUrl = $imagePath;
|
||||
} else {
|
||||
$imageUrl = Storage::disk('public')->url($imagePath);
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="mt-2">
|
||||
<img src="{{ $imageUrl }}" alt="Profile Photo" width="100" class="rounded shadow-sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user