{{-- Credits Plus Enhanced Sidebar Links Component Created by: Exp (Discord: exp_yt) Company: ExpHost - https://www.exphost.net/ This code is the intellectual property of Exp and ExpHost. Unauthorized copying, modification, or distribution is prohibited. --}}
@foreach (\App\Classes\Navigation::getLinks() as $nav) @if (!empty($nav['children']))
@foreach ($nav['children'] as $child)
{{ $child['name'] }}
@endforeach
@else @isset($nav['icon']) @endisset {{ $nav['name'] }} @endif @isset($nav['separator'])
@endisset @endforeach
{{-- Separator between main navigation and dashboard navigation --}} @auth
@endauth {{-- Dashboard Navigation Section --}}
@foreach (\App\Classes\Navigation::getDashboardLinks() as $nav) @if (!empty($nav['children']))
@foreach ($nav['children'] as $child) @if ($child['condition'] ?? true)
{{ $child['name'] }}
@endif @endforeach
@else @isset($nav['icon']) @endisset {{ $nav['name'] }} @endif @isset($nav['separator'])
@endisset @endforeach {{-- Language, Currency & Theme Toggle for Mobile --}}
{{ strtoupper(app()->getLocale()) }} | {{ session('currency', config('settings.default_currency')) }}
Language & Currency
Language Currency
@if(auth()->check())
{{-- Credits Display for Mobile --}} @php try { $user = auth()->user(); $credits = $user->credits()->with('currency')->get(); if ($credits->isEmpty()) { $currencyCode = session('currency', config('settings.default_currency', 'USD')); $currency = \App\Models\Currency::where('code', $currencyCode)->first(); if ($currency) { $creditsDisplay = $currency->prefix . '0.00' . $currency->suffix; } else { $creditsDisplay = '0.00 ' . $currencyCode; } } else { $creditsByCurrency = $credits->groupBy('currency_code'); $maxAmount = null; $maxCurrencyCode = null; $maxCurrency = null; foreach ($creditsByCurrency as $currencyCode => $userCredits) { $totalAmount = $userCredits->sum('amount'); if ($totalAmount <= 0) continue; if ($maxAmount === null || $totalAmount > $maxAmount) { $maxAmount = $totalAmount; $maxCurrencyCode = $currencyCode; $maxCurrency = $userCredits->first()->currency; } } if ($maxAmount === null) { $currencyCode = session('currency', config('settings.default_currency', 'USD')); $currency = \App\Models\Currency::where('code', $currencyCode)->first(); if ($currency) { $creditsDisplay = $currency->prefix . '0.00' . $currency->suffix; } else { $creditsDisplay = '0.00 ' . $currencyCode; } } else { if ($maxCurrency) { $creditsDisplay = $maxCurrency->prefix . number_format($maxAmount, 2) . $maxCurrency->suffix; } else { $creditsDisplay = number_format($maxAmount, 2) . ' ' . $maxCurrencyCode; } } } } catch (\Exception $e) { $creditsDisplay = '0.00'; } @endphp @if(isset($creditsDisplay))
Account Credits {{ $creditsDisplay }}
@endif
User Avatar
{{ auth()->user()->name }} {{ auth()->user()->email }}
@foreach (\App\Classes\Navigation::getAccountDropdownLinks() as $nav) {{ $nav['name'] }} @endforeach
@else
@if(!config('settings.registration_disabled', false)) @endif
@endif