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

{{ $portfolio->name }}

{{-- Charts Placeholder --}}

Performance Trend

Allocation

{{-- Funds Table --}}
@foreach($portfolio->funds as $fund) @php $totalDeposits = $fund->entries->sum('deposit'); $currentBalance = $fund->entries->last()?->current_balance ?? 0; $gain = $currentBalance - $totalDeposits; $rate = $totalDeposits > 0 ? ($gain / $totalDeposits) * 100 : 0; @endphp @endforeach
Fund Current Balance Total Deposits Gain Rate (%) Actions
{{ $fund->name }} {{ number_format($currentBalance) }} {{ number_format($totalDeposits) }} {{ number_format($gain) }} {{ number_format($rate, 2) }}% Add Entry
@endsection {{-- Put scripts **after** the section! --}} @section('scripts') @endsection