@extends('layouts.app') @php $authUser = auth()->user(); $avatar = trim((string) ($authUser?->avatar ?? '')); $avatarSrc = $avatar !== '' ? (preg_match('/^https?:\/\//', $avatar) ? $avatar : asset($avatar)) : ''; $userInitial = strtoupper(substr(trim((string) ($authUser?->name ?? 'N')), 0, 1)) ?: 'N'; $firstName = old('first_name', $authUser?->first_name); $lastName = old('last_name', $authUser?->last_name); if (empty($firstName) && empty($lastName) && !empty($authUser?->name)) { $parts = explode(' ', trim($authUser->name), 2); $firstName = $parts[0] ?? ''; $lastName = $parts[1] ?? ''; } if (empty($firstName)) $firstName = 'Naeem'; if (empty($lastName)) $lastName = 'Ahmed'; $dobRaw = $authUser?->dob ? $authUser->dob->format('Y-m-d') : '2026-05-20'; $dobDisplay = $authUser?->dob ? $authUser->dob->format('M.d,Y') : 'May.20,2026'; $genderVal = strtolower((string) ($authUser?->gender ?: 'male')); $genderDisplay = ucfirst($genderVal === 'female' ? 'Female' : 'Male'); $showContact = (bool) ($authUser?->show_contact_to_cosubscribers ?? false); $phoneDisplay = $authUser?->phone ? $authUser->phone : 'Your phone number'; @endphp @section('content')

Profile

@csrf @method('PATCH')
@if($avatarSrc !== '') {{ $authUser?->name }} @else {{ $userInitial }} @endif
The profile picture reassures other users in a group.

Personal info

{{ $firstName }} {{ $lastName }}
{{ $dobDisplay }}
{{ $genderDisplay }}

Contact information

{{ $authUser?->email }}
Show my email to co-subscribers
{{ $phoneDisplay }}
@endsection