@extends('layoutsfrontend.master') @section('content')

contact us

Contact information

At our rehab clinic, we provide compassionate, evidence-based support each individual's journey toward lasting recovery.

@foreach($contact_info as $index => $item) @php $iconImg = $item->galleries($contact_category_id)->first(); // Category ID for contact is usually 1, 2, or 3 based on id_array but I created one with 'contact' slug. // Wait, the controller used getCategoryId() which creates/returns ID for 'contact'. // I'll check what that ID is. (Actually I'll just use the galleries relationship) $iconPath = getgallery($iconImg); // Fallback icons based on name if (!$iconPath) { $nameLower = strtolower($item->name); if (str_contains($nameLower, 'phone') || str_contains($nameLower, 'contact')) $iconPath = asset('images/icon-phone.svg'); elseif (str_contains($nameLower, 'mail') || str_contains($nameLower, 'email')) $iconPath = asset('images/icon-mail.svg'); elseif (str_contains($nameLower, 'address') || str_contains($nameLower, 'location')) $iconPath = asset('images/icon-location.svg'); elseif (str_contains($nameLower, 'hour') || str_contains($nameLower, 'clock') || str_contains($nameLower, 'time')) $iconPath = asset('images/icon-clock.svg'); else $iconPath = asset('images/icon-phone.svg'); } @endphp
{{ $item->name }}

{{ $item->name }}

@php $points = explode("\n", $item->content); @endphp @foreach($points as $point) @if(trim($point)) @php $nameLower = strtolower($item->name); if(str_contains($nameLower, 'contact') || str_contains($nameLower, 'email')) { @endphp

{{ trim($point) }}

@php }else{ @endphp

{{ trim($point) }}

@php } @endphp @endif @endforeach
@endforeach

Get in touch with us

@foreach($departments as $index => $dept)

{{ $dept->name }}

    @if($dept->department_number)
  • {{ $dept->department_number }}
  • @endif @if($dept->department_location)
  • {{ $dept->department_location }}
  • @endif
@endforeach
@endsection