{{ __('ui.coaster_profile_title') }}
{{ $translation?->description ?: $translation?->summary ?: __('ui.coaster_description_empty') }}
{{ __('ui.coaster_data_pending_text') }}
@extends('layouts.app') @push('head') @endpush @php $attraction = $coaster->attraction; $park = $attraction->park; $translation = $attraction->translations->firstWhere('locale', app()->getLocale()) ?? $attraction->translations->firstWhere('locale', 'en'); $coasterName = $translation?->name ?: $attraction->official_name; $parkTranslation = $park->translations->firstWhere('locale', app()->getLocale()) ?? $park->translations->firstWhere('locale', 'en'); $parkName = $parkTranslation?->name ?: $park->official_name; $live = $attraction->liveStatus; $liveFresh = (bool) ($liveInsight['is_fresh'] ?? false); $liveStatus = $liveInsight['status'] ?? 'unknown'; $displayWait = $liveInsight['display_wait_minutes'] ?? null; $waitKind = $liveInsight['wait_kind'] ?? 'unavailable'; $waitTrend = $liveInsight['trend'] ?? 'unknown'; $waitTrendDelta = $liveInsight['trend_delta_minutes'] ?? null; $singleRiderWait = $liveInsight['single_rider_wait_minutes'] ?? null; $liveObservedAt = $liveInsight['source_observed_at'] ?? $live?->fetched_at; $liveOpen = in_array($liveStatus, ['open', 'operating'], true); $liveClosed = in_array($liveStatus, ['down', 'closed', 'refurbishment'], true); $liveStatusLabel = match ($liveStatus) { 'open', 'operating' => __('ui.live_status_open'), 'down' => __('ui.live_status_down'), 'closed' => __('ui.live_status_closed'), 'refurbishment' => __('ui.live_status_refurbishment'), default => __('ui.live_status_unknown'), }; $catalogStatusLabel = ucfirst(str_replace('_', ' ', $attraction->status ?: __('ui.coaster_unknown'))); $parkLocation = collect([$park->city, $park->country?->official_name])->filter()->join(' · '); $modelName = $coaster->rideModel?->name; $modelDisplayName = $modelName; if ($modelDisplayName && $coaster->length_m !== null) { // Use a non-slash regex delimiter because '/' is one of the accepted // separators in model names such as "Family Thrill Launch / 670m". // The previous slash-delimited pattern treated that character as the // end of the regex and could raise an ErrorException on public pages. $cleanModelDisplayName = preg_replace('~\s*[/|·-]\s*\d+(?:[.,]\d+)?\s*m\s*$~iu', '', $modelDisplayName); if (is_string($cleanModelDisplayName) && trim($cleanModelDisplayName) !== '') { $modelDisplayName = $cleanModelDisplayName; } } $duration = $coaster->duration_seconds ? sprintf('%d:%02d', intdiv($coaster->duration_seconds, 60), $coaster->duration_seconds % 60) : null; $knownSpecs = collect([ $coaster->height_m, $coaster->drop_m, $coaster->length_m, $coaster->speed_kmh, $coaster->inversions, $coaster->launches, $coaster->trains, $coaster->duration_seconds, ])->filter(fn ($value) => $value !== null)->count(); @endphp @section('title', $coasterName.' — Coaster World') @if($bannerUrl) @push('head') @endpush @endif @section('content') @if(session('community_photo_status') === 'submitted')
{{ $translation?->description ?: $translation?->summary ?: __('ui.coaster_description_empty') }}
{{ __('ui.coaster_data_pending_text') }}