@extends('Backend.Layouts.app') @php $page_title = 'User Profile'; $fullName = $user->name ?? 'Unknown User'; $initials = collect(explode(' ', trim($fullName))) ->filter() ->take(2) ->map(fn($part) => strtoupper(substr($part, 0, 1))) ->implode(''); $permissions = $user->permissions() ?? []; @endphp @section('content')
{{-- Profile Header --}}
{{ $initials ?: 'U' }}
User Profile

{{ $fullName }}

{{ $user->username ?? 'No username' }}
{{ $user->role_name() ?? 'User' }}
{{-- Contact Information --}}
Contact Information
Full Name
{{ $user->name ?? 'Not provided' }}
Email Address
{{ $user->email ?? 'Not provided' }}
Phone Number
{{ $user->phone_number ?: 'Not provided' }}
Gender
{{ $user->gender ? ucfirst($user->gender) : 'Not specified' }}
Assigned Role
{{ $user->role_name() ?: 'Not assigned' }}
{{-- Permissions --}}
User Permissions
@if(count($permissions) > 0)

This account has access to the following system permissions.

@foreach($permissions as $permission) {{ ucwords(clean_text($permission)) }} @endforeach
@else
No permissions assigned
This user does not have any additional permissions.
@endif
@stop