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

Branches

@if(!in_array(auth()->user()->role, ['accountant', 'auditor'])) Add Branch @endif
@if(session('success'))
{{ session('success') }}
@endif @foreach($branches as $branch) @endforeach
# Name Users Actions
{{ $loop->iteration }} {{ $branch->name }} {{ $branch->users->sortBy('name')->pluck('name')->implode(', ') ?: 'No users assigned' }} Show @if(!in_array(auth()->user()->role, ['accountant', 'auditor'])) Edit
@csrf @method('DELETE')
@endif
{{ $branches->links() }}
@endsection