@extends('public.layout') @section('title','Offices — Noesantara Law Firm') @section('content')

Our Offices

@foreach($offices as $o)

{{ $o->name }}

{{ $o->address }}
@if($o->city || $o->country)
{{ trim($o->city.' '.($o->country ? '— '.$o->country : '')) }}
@endif @if($o->phone) @endif @if($o->email) @endif
@if($o->map_url) View map @endif @php $dest = ($o->lat && $o->lng) ? ($o->lat.','.$o->lng) : urlencode(trim(($o->address ? $o->address.', ' : '').($o->city ? $o->city.' ' : '').($o->country ?? ''))); @endphp Directions
@endforeach
@endsection @php // Precompute a JSON-safe array for JS so Blade doesn't parse a closure inside @json $officeList = $offices->map(function($o) { return [ 'name' => $o->name, 'address' => $o->address, 'city' => $o->city, 'country' => $o->country, 'map_url' => $o->map_url, 'phone' => $o->phone, 'email' => $o->email, 'lat' => $o->lat, 'lng' => $o->lng, ]; })->values(); @endphp @push('scripts') @php($gmapKey = \App\Models\Setting::get('google_maps_api_key','')) @if(!empty($gmapKey)) @else @endif @endpush