{{-- Mobile Activity Feed Partial Shows recent account activities and important updates Expects: $recentTransactions, $user --}} @php $user = Auth::user(); // Create activity feed with only transactions $activities = collect(); // Add recent transactions if(isset($recentTransactions)) { foreach($recentTransactions->take(5) as $tx) { $activities->push((object)[ 'type' => 'transaction', 'icon' => $tx->icon_fa, 'icon_bg' => $tx->bg_class, 'icon_color' => $tx->color_class, 'title' => $tx->name, 'description' => $tx->amount_formatted, 'time' => $tx->date, 'action' => 'View Details', 'action_url' => route('accounthistory') ]); } } // Account milestones and achievements $milestones = []; if($user->created_at->diffInDays() <= 7) { $milestones[] = [ 'icon' => 'fa-solid fa-star', 'title' => 'Welcome to ' . ($settings->site_name ?? 'Banking'), 'description' => 'Account created ' . $user->created_at->diffForHumans(), 'color' => 'text-yellow-600' ]; } if($user->account_bal > 0) { $milestones[] = [ 'icon' => 'fa-solid fa-trophy', 'title' => 'First Deposit', 'description' => 'Great start to your financial journey!', 'color' => 'text-green-600' ]; } if($user->two_factor_enabled) { $milestones[] = [ 'icon' => 'fa-solid fa-shield-check', 'title' => 'Security Enhanced', 'description' => 'Two-factor authentication enabled', 'color' => 'text-blue-600' ]; } @endphp
{{ $activity->title }}
{{ $activity->description }}
{{ $activity->time }}
Your account activity will appear here
{{ $milestone['title'] }}
{{ $milestone['description'] }}