@section('plugins.Select2', true)
Job title: {{ $user->jobtitle }}
Company: {{ $user->company ? $user->getCompany?->companyname : 'Unassigned' }}
Department: {{ $user->department ? $user->getDepartment->departmentname : 'Unassigned' }}
Division: {{ $user->division ? $user->getDivision->divisionname : 'Unassigned' }}
Role: {{ $user->role ? $user->getRole->rolename : 'Unassigned' }}
@php // Split the comma-separated role IDs into an array $Teams = explode(',', $user->team); // Retrieve the corresponding role names from the roles table $TeamSplit = App\Models\Team::whereIn('id', $Teams)->pluck('team'); @endphp Team*: @foreach ($TeamSplit as $teamNameSplit) {{ $teamNameSplit }} @endforeach @error('team') {{ $message }} @enderror
Level*: {{ $user->level }} @error('level') {{ $message }} @enderror
Location: {{ $user->location ? $user->getLocation->locationname : 'Unassigned' }}