@push('styles') @endpush @php $isFlatAccount = $isFlatAccount ?? false; $profile = $profile ?? $user->profile; $address = $address ?? $user->address; $educations = collect($educations ?? $user->educations); $experiences = collect($experiences ?? $user->experiences); $skills = collect($skills ?? $user->skills); $roleNames = method_exists($user, 'getRoleNames') ? $user->getRoleNames() : collect(); $primaryRole = $roleNames->first() ?: 'Member'; $publicUrl = $profile?->public_url; $publicLink = $publicUrl ? route('profile.public.show', ['public_url' => $publicUrl]) : null; $isMentor = $user && method_exists($user, 'hasRole') ? $user->hasRole('mentor') : false; $completionChecks = [ filled($user->name), filled($user->email), filled($user->profile_image), filled($profile?->mobile_number), filled($profile?->bio), filled($publicUrl), filled($address?->city) && filled($address?->country), $educations->isNotEmpty(), $experiences->isNotEmpty(), $skills->isNotEmpty(), ]; $completedCount = collect($completionChecks)->filter()->count(); $completionPercent = (int) round(($completedCount / count($completionChecks)) * 100); $profileSections = [ ['id' => 'public-link', 'label' => 'Public Link', 'icon' => 'fa-link'], ['id' => 'account', 'label' => 'Account', 'icon' => 'fa-user'], ['id' => 'details', 'label' => 'Details', 'icon' => 'fa-id-card'], ['id' => 'address', 'label' => 'Address', 'icon' => 'fa-location-dot'], ['id' => 'education', 'label' => 'Education', 'icon' => 'fa-graduation-cap'], ['id' => 'experience', 'label' => 'Experience', 'icon' => 'fa-briefcase'], ['id' => 'skills', 'label' => 'Skills', 'icon' => 'fa-screwdriver-wrench'], ['id' => 'security', 'label' => 'Security', 'icon' => 'fa-shield-halved'], ]; @endphp Profile Manage your profile @if($publicLink) View public profile @endif {{ $user->name }} {{ ucfirst($primaryRole) }} {{ $user->email }} {{ $user->email_verified_at ? 'Verified email' : 'Email not verified' }} @if($profile?->mobile_number) {{ $profile->mobile_number }} @endif Profile completion {{ $completionPercent }}% {{ $completedCount }} of {{ count($completionChecks) }} items complete @include('profile.partials.public-url') @include('profile.partials.update-profile-information-form') @include('profile.partials.update-profile-details-form') @include('profile.partials.update-address-form') @include('profile.partials.manage-educations-form') @include('profile.partials.manage-experiences-form') @include('profile.partials.manage-skills-form') @include('profile.partials.update-password-form') @unless($isMentor) @include('profile.partials.delete-user-form') @endunless
Profile
{{ $user->email }}