@extends('admin.layouts.dashboard') @section('title', 'Edit Partner') @section('content') @php $locations = old('locations'); if (! is_array($locations) || count($locations) === 0) { $locations = $partner->locations->map(function ($location) { return [ 'label' => $location->label, 'address' => $location->address, 'map_location_url' => $location->map_location_url, 'map_lat' => $location->map_lat, 'map_lng' => $location->map_lng, 'business_logo' => $location->business_logo, 'business_image' => $location->business_image, 'is_primary' => $location->is_primary, ]; })->values()->all(); } if (count($locations) === 0) { $locations = [[ 'label' => 'Main Branch', 'address' => $partner->business_address, 'map_location_url' => $partner->map_location_url, 'map_lat' => $partner->map_lat, 'map_lng' => $partner->map_lng, 'business_logo' => $partner->business_logo, 'business_image' => $partner->business_image, 'is_primary' => true, ]]; } $mainBranch = collect($locations)->firstWhere('is_primary', true) ?? ($locations[0] ?? null); @endphp
Update partner profile and manage all branch locations in one place.
If map URL is not exact, set Latitude/Longitude manually below.