@extends('layouts.shell') @section('title', 'Edit brand') @section('subtitle', 'Update logo, owner crop, social links, and branch contacts.') @push('styles') @endpush @section('content')
@csrf @method('PUT') @include('admin.brands._brand-fields', ['brand' => $brand])

Images

Leave a file empty to keep the current image. New files are compressed.

Branches

Each shop can have its own phone, WhatsApp, address, and optional map pin.

@php $rows = old('branches'); if (! is_array($rows) || $rows === []) { $rows = $brand->branches->map(fn ($item) => [ 'name' => $item->name, 'phone' => $item->phone, 'whatsapp' => $item->whatsapp, 'address' => $item->address, 'city_id' => $item->city_id, 'province_id' => $item->city?->province_id, 'working_hours' => $item->working_hours, 'is_active' => $item->is_active, 'is_primary' => $item->is_primary, 'latitude' => $item->latitude, 'longitude' => $item->longitude, ])->all(); if ($rows === []) { $rows = [[]]; } } @endphp
@foreach ($rows as $index => $branch) @include('admin.brands._branch-fields', ['index' => $index, 'branch' => $branch, 'cities' => $cities]) @endforeach
Cancel
@endsection @push('scripts') @include('admin.brands._brand-editor-script') @include('admin.brands._branch-script') @endpush