{{-- 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

Recent Activity

View All
@if($activities->count() > 0)
@foreach($activities as $activity)

{{ $activity->title }}

{{ $activity->description }}

{{ $activity->time }}

{{ $activity->action }}
@endforeach
@else

No Recent Activity

Your account activity will appear here

@endif
@if(count($milestones) > 0)

Achievements

@foreach($milestones as $milestone)

{{ $milestone['title'] }}

{{ $milestone['description'] }}

@endforeach
@endif