@extends('layouts.layout-horizontal') @section('title', 'User Management') @section('content')
Users
Add User
@foreach ($users as $user) @endforeach
# Name Email Role Company Access Actions
{{ $loop->iteration }} {{ $user->name }} {{ $user->email }} @php $roleBadges = [ 'admin' => 'bg-danger', 'ca' => 'bg-primary', 'cash' => 'bg-dark', 'manager' => 'bg-info', 'viewer' => 'bg-secondary', ]; @endphp {{ strtoupper($user->role) }} @php $allowedCompanies = $user->getAllowedCompanies(); @endphp @if ($user->role === 'admin') All Companies @else @foreach ($allowedCompanies as $company) {{ $company->name }} @endforeach @endif
@if ($user->id !== auth()->id()) @endif
@endsection