fix: make flight images section dynamic
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<div class="listing-content">
|
||||
<div class="listing-slider owl-carousel owl-theme" dir="ltr">
|
||||
@if ($flight->images && $flight->images->count() > 0)
|
||||
@if ($flight->images->count() > 1)
|
||||
@foreach ($flight->images as $image)
|
||||
<img src="{{ asset($image->path) }}" alt="{{ $flight->flight_number }}">
|
||||
@if($flight->images && $flight->images->count() > 0)
|
||||
@if($flight->images->count() > 1)
|
||||
@foreach($flight->images as $image)
|
||||
<img src="{{ getFileUrl($image->file_id) }}" alt="{{ $flight->flight_number }}">
|
||||
@endforeach
|
||||
@else
|
||||
<img src="{{ asset($flight->images->first()->path) }}" alt="{{ $flight->flight_number }}">
|
||||
<img src="{{ getFileUrl($flight->images->first()->file_id) }}" alt="{{ $flight->flight_number }}">
|
||||
@endif
|
||||
@else
|
||||
<img src="{{ asset('assets/img/flight/single-1.jpg') }}" alt="{{ $flight->flight_number }}">
|
||||
|
||||
Reference in New Issue
Block a user