{{-- resources/views/admin/destinations/show.blade.php --}} @extends('admin.layouts.app') @section('title', $destination->name . ' - Destination Details') @section('page-title', 'Destination Details') @section('content')
@if(isset($previousDestination) && $previousDestination) Previous Destination @else Previous Destination @endif
Back to Destinations
@if(isset($nextDestination) && $nextDestination) Next Destination @else Next Destination @endif
@if($destination->getRawOriginal('image_url')) {{ $destination->name }}
@if(str_starts_with($destination->getRawOriginal('image_url'), 'image')) Seeded Image @else Uploaded Image @endif
@else

No Image Available

@endif
{{ $destination->tripTemplates->count() }} Template{{ $destination->tripTemplates->count() !== 1 ? 's' : '' }}

{{ $destination->name }}

{{ $destination->city }}, {{ $destination->country }}

@if($destination->description)

{{ $destination->description }}

@else

No description available.

@endif
{{ $destination->tripTemplates->count() }}
Trip Template{{ $destination->tripTemplates->count() !== 1 ? 's' : '' }}
Destination Information
Name: {{ $destination->name }}
Location: {{ $destination->city }}, {{ $destination->country }}
@if($destination->getRawOriginal('image_url'))
Image:
{{ basename($destination->getRawOriginal('image_url')) }}
@if(str_starts_with($destination->getRawOriginal('image_url'), 'image')) Seeded @else Uploaded @endif
@endif
Created: {{ format_admin_date($destination->created_at) }}
Updated: {{ format_admin_date($destination->updated_at) }}
Status:
@if($destination->tripTemplates->count() > 0) Active
Has {{ $destination->tripTemplates->count() }} template(s)
@else Inactive
No templates created
@endif
Trip Templates {{ $destination->tripTemplates->count() }}
Add Template
@if($destination->tripTemplates->count() > 0)
@foreach($destination->tripTemplates as $template)
{{ $template->title }}
@if($template->is_featured) Featured @endif
@if($template->description)

{{ Str::limit($template->description, 80) }}

@else

No description available.

@endif
Duration
{{ $template->duration_days }} day{{ $template->duration_days !== 1 ? 's' : '' }}
Price
${{ number_format($template->base_price, 0) }}
Activities
{{ $template->activities_count ?? 0 }}
{{ ucfirst($template->difficulty_level) }} {{ ucfirst(str_replace('_', ' ', $template->trip_style)) }}
Created {{ $template->created_at->diffForHumans() }}
@if($template->updated_at->gt($template->created_at))
Updated {{ $template->updated_at->diffForHumans() }}
@endif
@endforeach
@if($destination->tripTemplates->count() > 1)
Template Summary
Total Templates
{{ $destination->tripTemplates->count() }}
Featured
{{ $destination->tripTemplates->where('is_featured', true)->count() }}
Avg. Price
${{ number_format($destination->tripTemplates->avg('base_price'), 0) }}
Avg. Duration
{{ number_format($destination->tripTemplates->avg('duration_days'), 1) }} days
@endif @else
No Trip Templates

This destination doesn't have any trip templates yet. Get started by creating the first one!

Create First Template
@endif
Back to Destinations
Edit Destination @if($destination->tripTemplates->count() == 0) @else @endif
@if($destination->tripTemplates->count() == 0) @endif @endsection