@extends('layouts.app') @php $authUser = auth()->user(); $avatar = trim((string) ($authUser?->avatar ?? '')); $displayBalance = number_format((float) ($authUser?->balance ?? 0), 2); $displayCurrency = strtoupper((string) (optional($authUser?->wallet)->currency ?? 'USD')); $currencySymbol = match ($displayCurrency) { 'EUR' => '€', 'GBP' => '£', default => '$', }; $userNavSection = 'profile'; $userInitial = strtoupper(substr(trim((string) ($authUser?->name ?? 'U')), 0, 1)) ?: 'U'; @endphp @section('content')
@if($avatar !== '') {{ $authUser?->name }} @else {{ $userInitial }} @endif
{{ $authUser?->name }}
Balance
{!! $displayBalance . $currencySymbol !!}
Edit Account
@csrf @method('PATCH')
@error('name')
{{ $message }}
@enderror
@error('email')
{{ $message }}
@enderror
@if (session('status') === 'profile-updated') Saved. @endif
Refund
Referral and earn Change Password
Log Out
@endsection