@extends('adminlte::page') @section('title', 'Branches Management') @section('content_header')

Branches Management

@stop @section('content')
Total Branches
{{ $branches->count() }}
Active locations
Total Members
{{ $branches->sum(fn($branch) => $branch->users()->count()) }}
Across all branches
Contact Info
{{ $branches->where('contact', '!=', null)->count() }}
Branches with contact details
Managed Branches
{{ $branches->where('manager', '!=', null)->count() }}
Branches with assigned managers
@if($branches->isNotEmpty()) @foreach($branches as $branch) @endforeach
ID Branch Name Location Contact Manager Members Created Actions
{{ $branch->id }}
{{ Str::limit($branch->name, 20) }}
@if($branch->description) {{ Str::limit($branch->description, 25) }} @endif
{{ Str::limit($branch->location, 15) }} {{ $branch->contact ?? 'N/A' }} {{ Str::limit($branch->manager ?? 'N/A', 12) }} {{ $branch->users()->count() }} {{ $branch->created_at->format('d M') }}
@csrf @method('DELETE')
@else

No Branches Found

You haven't added any branches yet. Start by adding your first branch.

Add Branch
@endif
@if($branches->hasPages()) @endif
@push('js') @if(session('success')) Swal.fire({ icon: 'success', title: 'Success!', text: '{{ session("success") }}', timer: 3000, showConfirmButton: false }); @endif @if(session('error')) Swal.fire({ icon: 'error', title: 'Error!', text: '{{ session("error") }}', timer: 3000, showConfirmButton: false }); @endif @endpush @stop