{{ env('APP_NAME') }}

@php use Illuminate\Support\Collection; use Carbon\Carbon; // $withdrawRequests = DB::table('withdraw')->where('status', '=', '0')->count(); // $depositRequests = DB::table('deposit')->where('status', '=', '0')->count(); // $leverageRequests = DB::table('leverage')->where('status', '=', '0')->count(); // $allnotification = $withdrawRequests + $depositRequests + $leverageRequests; $withdrawRequests = DB::table('withdraw') ->where('status', '=', '0') ->select('id', 'created_at', DB::raw("'withdraw' as type")) ->get(); $withdrawCount = $withdrawRequests->count(); $depositRequests = DB::table('deposit') ->where('status', '=', '0') ->select('id', 'created_at', DB::raw("'deposit' as type")) ->get(); $depositCount = $depositRequests->count(); $leverageRequests = DB::table('leverage') ->where('status', '=', '0') ->select('id', 'created_at', DB::raw("'leverage' as type")) ->get(); $leverageCount = $leverageRequests->count(); // Combine all collections $notifications = collect($withdrawRequests) ->merge($depositRequests) ->merge($leverageRequests); // Format created_at using Carbon foreach ($notifications as $notification) { $notification->time_ago = Carbon::parse($notification->created_at)->diffForHumans(); } // Sort by created_at in descending order $notifications = $notifications->sortByDesc('created_at'); $totalNotifications = $notifications->count(); @endphp
    {{--
  • user
    • img-flafSpanish
    • img-flafItalian
    • img-flafFrench
    • img-flafGerman
    • img-flafJapanese
  • --}}
  • @if($totalNotifications > 0) {{ $totalNotifications ?? '' }} @endif
    All Notifications
    @foreach($notifications as $notification)
    @if($notification->type === 'withdraw') @elseif($notification->type === 'deposit') @elseif($notification->type === 'leverage') @endif
    @if($notification->type === 'withdraw') {{ $withdrawCount }} Withdraw @elseif($notification->type === 'deposit') {{ $depositCount }} Deposit @elseif($notification->type === 'leverage') {{ $leverageCount }} Leverage @endif Request
    {{ $notification->time_ago }}
    @endforeach
  • User-Profile User-Profile User-Profile User-Profile User-Profile User-Profile
    {{ auth()->user()->name ?? 'Austin Robertson' }}

    {{ str_replace('_', ' ', auth()->user()->roles->pluck('title')->implode(', ')) ?? 'Marketing Administrator' }}

    • My Profile
    • Change Password

    • @csrf {{ __('Log out') }}