@extends('layouts.app') @section('content') @php // $roles should be a collection/array of role names, e.g. Role::pluck('name') $userRoles = $user->getRoleNames()->all(); @endphp
{{-- Card --}}
{{-- top header (avatar + title) --}}
{{-- optional avatar or placeholder --}} {{ strtoupper(mb_substr($user->name,0,1)) }}

الملف الشخصي

معلومات الحساب وإدارة الصلاحيات {{ $userRoles ? $userRoles[0] ?? '—' : '—' }}
{{-- Success / error messages --}}
{{-- body (form) --}}
@method('PUT') @csrf
{{-- bottom utilities: account date, buttons (edit/save/cancel) --}}
الحساب منذ: {{ $user->created_at->format('Y-m-d') }}
{{-- Edit toggle (now at bottom) --}} {{-- Save / Cancel (hidden initially) --}}
{{-- Optional: show roles summary below the card --}}
الصلاحيات الحالية: {{ $user->getRoleNames()->join(', ') ?: '—' }}
@push('style') @endpush @push('scripts') @endpush @endsection