Investor Account
@yield('portal_title', 'User Portal')
@yield('portal_subtitle', 'Manage your Crosby Farm and Investments account.')
Wallet Balance {{ $portalWalletBalance }}@extends('layouts.admin') @push('styles') @endpush @section('content') @php $portalMenu = [ ['label' => 'Dashboard', 'url' => '/portal', 'active' => 'portal', 'icon' => 'dashboard'], ['label' => 'Profile', 'url' => '/portal/profile', 'active' => 'portal/profile', 'icon' => 'profile'], ['label' => 'Change Password', 'url' => '/portal/change-password', 'active' => 'portal/change-password', 'icon' => 'lock'], ['label' => 'Investment Plans', 'url' => '/portal/investment-plans', 'active' => 'portal/investment-plans', 'icon' => 'plans'], ['label' => 'My Plan', 'url' => '/portal/my-plan', 'active' => 'portal/my-plan', 'icon' => 'my-plan'], ['label' => 'Wallet', 'url' => '/portal/wallet', 'active' => 'portal/wallet', 'icon' => 'wallet'], ['label' => 'Withdraw Balance', 'url' => '/portal/withdrawal', 'active' => 'portal/withdrawal', 'icon' => 'withdrawal'], ['label' => 'Payment History', 'url' => '/portal/payment-history', 'active' => 'portal/payment-history', 'icon' => 'payment'], ['label' => 'Support', 'url' => '/portal/support', 'active' => 'portal/support', 'icon' => 'support'], ]; $portalUser = session('portal_user', []); $portalUserName = trim($portalUser['name'] ?? ''); $portalUserEmail = trim($portalUser['email'] ?? ''); $portalUserName = in_array($portalUserName, ['', 'Not provided', 'Investor User'], true) ? 'User' : $portalUserName; $portalUserEmail = in_array($portalUserEmail, ['', 'Not provided'], true) ? 'Investor Account' : $portalUserEmail; $portalWallet = function_exists('portalWalletForUser') ? portalWalletForUser($portalUser['email'] ?? null) : ['balance' => 0, 'available_balance' => 0, 'pending_withdrawals' => 0]; $portalWalletBalance = '$' . number_format((float) ($portalWallet['balance'] ?? 0), 2); $portalAvailableBalance = '$' . number_format((float) ($portalWallet['available_balance'] ?? 0), 2); $avatarInitials = collect(explode(' ', trim($portalUserName))) ->filter() ->take(2) ->map(fn ($part) => strtoupper(substr($part, 0, 1))) ->implode('') ?: 'U'; @endphp
Investor Account
@yield('portal_subtitle', 'Manage your Crosby Farm and Investments account.')
Wallet Balance {{ $portalWalletBalance }}