feat(favorites): make images dynamic in user favorites section
This commit is contained in:
@@ -42,9 +42,15 @@
|
|||||||
<div class="hotel-item h-100 d-flex flex-column justify-content-between">
|
<div class="hotel-item h-100 d-flex flex-column justify-content-between">
|
||||||
<div class="hotel-img position-relative">
|
<div class="hotel-img position-relative">
|
||||||
<span class="badge bg-info position-absolute top-0 start-0 m-2">تور</span>
|
<span class="badge bg-info position-absolute top-0 start-0 m-2">تور</span>
|
||||||
<img src="{{ $favorite->tour->file ? asset($favorite->tour->file->path) : asset('assets/img/tour/default.jpg') }}"
|
@if($favorite->tour->coverImage?->file)
|
||||||
alt="{{ $favorite->tour->title }}"
|
<img src="{{ getFileUrl($tour->coverImage->file_id) }}"
|
||||||
style="height: 200px; width: 100%; object-fit: cover;">
|
class="w-100 h-100"
|
||||||
|
alt="{{ $favorite->tour->title }}">
|
||||||
|
@else
|
||||||
|
<img src="{{ asset('assets/admin/images/faces/DefaultAvatar.jpg') }}"
|
||||||
|
class="w-100 h-100"
|
||||||
|
alt="{{ $favorite->tour->title }}">
|
||||||
|
@endif
|
||||||
|
|
||||||
<form method="POST" action="{{ route('accounts.favorites.tour.toggle', $favorite->tour->id) }}" class="d-inline">
|
<form method="POST" action="{{ route('accounts.favorites.tour.toggle', $favorite->tour->id) }}" class="d-inline">
|
||||||
@csrf
|
@csrf
|
||||||
@@ -88,9 +94,15 @@
|
|||||||
<div class="hotel-item h-100 d-flex flex-column justify-content-between">
|
<div class="hotel-item h-100 d-flex flex-column justify-content-between">
|
||||||
<div class="hotel-img position-relative">
|
<div class="hotel-img position-relative">
|
||||||
<span class="badge bg-primary position-absolute top-0 start-0 m-2">پرواز</span>
|
<span class="badge bg-primary position-absolute top-0 start-0 m-2">پرواز</span>
|
||||||
<img src="{{ $favorite->flight->file ? asset($favorite->flight->file->path) : asset('assets/img/flight/default.jpg') }}"
|
@if($favorite->flight->coverImage?->file_id)
|
||||||
alt="{{ $favorite->flight->flight_number }}"
|
<img src="{{ getFileUrl($favorite->flight->coverImage->file_id) }}"
|
||||||
style="height: 200px; width: 100%; object-fit: cover;">
|
class="w-100 h-100"
|
||||||
|
alt="{{ $favorite->flight->flight_number }}">
|
||||||
|
@else
|
||||||
|
<img src="{{ asset('assets/img/account/user.jpg') }}"
|
||||||
|
class="w-100 h-100"
|
||||||
|
alt="{{ $favorite->flight->title }}">
|
||||||
|
@endif
|
||||||
|
|
||||||
<form method="POST" action="{{ route('accounts.favorites.flight.toggle', $favorite->flight->id) }}" class="d-inline">
|
<form method="POST" action="{{ route('accounts.favorites.flight.toggle', $favorite->flight->id) }}" class="d-inline">
|
||||||
@csrf
|
@csrf
|
||||||
|
|||||||
Reference in New Issue
Block a user