@extends('layouts.app') @section('title', 'Agents - Cash Book') @section('content')

Agents

@if(!in_array(auth()->user()->role, ['accountant', 'auditor'])) @if(empty($businessId)) Select a business first @else Add Agent @endif @endif
@if(session('success'))
{{ session('success') }}
@endif @if(empty($businessId)) @else @foreach($agents as $agent) @endforeach @endif
# Name Business Actions
Select a business to view agents
{{ $loop->iteration }} {{ $agent->name }} {{ $agent->business->name ?? '-' }} Show @if(!in_array(auth()->user()->role, ['accountant', 'auditor'])) Edit
@csrf @method('DELETE')
@endif
@if($businessId) {{ $agents->links() }} @endif
@endsection