@extends('layouts.dashboard') @section('content')

Investments

@foreach($farmInvested as $farm) @endforeach
Cycle Amount Due Amount Paid Amount Unpaid
{{$farm->name}}
NGN {{number_format($farm->totalAmountSponsoredWithROIBy(auth()->id()))}}
@php $paidAmount = \App\Models\Tracker::where(['user_id' => auth()->id(),'farm_id' => $farm->id])->sum('amount') @endphp NGN {{number_format($paidAmount)}}
NGN {{number_format($farm->totalAmountSponsoredWithROIBy(auth()->id()) - $paidAmount)}}


Payout Tracker Details

@foreach(auth()->user()->trackers as $track) @endforeach
Cycle Amount Paid Date Paid
{{$track->farm->name}}
{{$track->formattedAmount}}
{{$track->created_at->format('d-m-Y')}}
@endsection