@extends('layouts.app') @section('title', __('My Account')) @php /* * Use the currency selected in Payment Settings throughout * the account dashboard and its financial partials. */ $displayCurrency = currency_code( $currency ?? default_currency() ); $profile = is_array($profile ?? null) ? $profile : []; $stats = is_array($stats ?? null) ? $stats : []; $sellerStatus = $sellerStatus ?? null; $recentOrders = collect($recentOrders ?? []); $recentWalletEntries = collect( $recentWalletEntries ?? [] ); $recentSupportTickets = collect( $recentSupportTickets ?? [] ); $recentNotifications = collect( $recentNotifications ?? [] ); $profilePercentage = max( 0, min( 100, (int) data_get( $profile, 'percentage', 0 ) ) ); $displayName = trim( (string) ( $user->first_name ?: $user->username ?: __('there') ) ); /* * last_seen may be returned as either a Carbon instance * or a plain database string. */ $lastSeen = null; if (filled($user->last_seen)) { try { $lastSeen = \Illuminate\Support\Carbon::parse( $user->last_seen ); } catch (\Throwable) { $lastSeen = null; } } $quickActions = [ [ 'route' => 'account.orders.index', 'icon' => 'fa-shopping-bag', 'label' => __('My Orders'), 'color' => 'primary', ], [ 'route' => 'account.wallet.index', 'icon' => 'fa-wallet', 'label' => __('Wallet'), 'color' => 'success', ], [ 'route' => 'account.downloads.index', 'icon' => 'fa-download', 'label' => __('Downloads'), 'color' => 'info', ], [ 'route' => 'account.wishlist.index', 'icon' => 'fa-heart', 'label' => __('Wishlist'), 'color' => 'danger', ], [ 'route' => 'account.messages.index', 'icon' => 'fa-comments', 'label' => __('Messages'), 'color' => 'warning', ], [ 'route' => 'account.support.index', 'icon' => 'fa-headset', 'label' => __('Support'), 'color' => 'secondary', ], ]; @endphp @section('content')
{{ now()->format('l, F j, Y') }} @if($lastSeen) {{ __('Last login: :time', [ 'time' => $lastSeen->diffForHumans(), ]) }} @endif