@extends('admin.layouts.app') @section('title', 'Edit Agent') @section('breadcrumb')
  • Agents
  • Edit Agent
  • @endsection @section('heading', 'Edit Agent') @section('subheading', 'Update agent profile and account.') @section('content') @php $profile = $user->agentProfile; @endphp
    @csrf @method('PUT') @if (session('success'))
    {{ session('success') }}
    @endif {{-- Section 1: Account --}}

    Account

    @error('name')

    {{ $message }}

    @enderror
    @error('email')

    {{ $message }}

    @enderror
    @error('password')

    {{ $message }}

    @enderror
    {{-- Section 2: Contact --}}

    Contact

    {{-- Section 3: Professional --}}

    Professional

    @error('agency_id')

    {{ $message }}

    @enderror
    @php $specs = old('specialization', $profile?->specialization ?? []); @endphp @foreach(['Residential', 'Commercial', 'Luxury', 'Rental', 'New Projects'] as $spec) @php $val = strtolower(str_replace(' ', '_', $spec)); @endphp @endforeach
    @php $langs = old('languages', $profile?->languages ?? []); @endphp @foreach(['English', 'Hindi', 'Marathi', 'Tamil', 'Telugu', 'Bengali'] as $lang) @php $val = strtolower($lang); @endphp @endforeach
    {{-- Section 4: Profile & Media --}}

    Profile & Media

    @if($profile?->profile_photo_url)
    @endif
    {{-- Section 5: Social & Address --}}

    Social & Address

    {{-- Section 6: Module Access --}}

    Module Access

    Choose which sections this agent can access in the admin panel.

    @foreach($permissionsByModule as $module => $permissions)

    {{ str_replace('-', ' ', $module) }}

    @php $userPermissionIds = old('permission_ids', $user->permissions->pluck('id')->toArray()); @endphp @foreach($permissions as $permission) @endforeach
    @endforeach
    {{-- Section 7: Status --}}

    Status

    {{-- Form Actions --}}
    Cancel
    @endsection