Files
investbrain/resources/views/portfolio/top-performers-list.blade.php
T
hackerESQ e6f38d9481 Chore: Upgrade to Laravel 12 + remove Mary and Jetstream dependencies (#141)
* docs: remove requirement for setting APP_KEY manually

* optimize date picker

* clean up modals

* spot light working

* reorganization

* add lazy load

* wip

* remove filament

* styling
2025-09-26 17:41:28 -05:00

48 lines
1.2 KiB
PHP

<?php
use Illuminate\Support\Collection;
use Livewire\Volt\Component;
new class extends Component
{
// props
public Collection $holdings;
// methods
}; ?>
<div class="">
@foreach(
$holdings->sortByDesc('market_gain_percent')
->where('quantity', '>', 0)
->where('market_data.market_value', '>', 0)
->take(5)
as $holding
)
<x-ui.list-item
no-separator
:item="$holding"
link="{{ route('holding.show', [
'portfolio' => $holding->portfolio_id,
'symbol' => $holding->symbol,
]) }}"
>
<x-slot:value class="flex items-center">
{{ $holding->market_data?->name }} ({{ $holding->symbol }})
<x-ui.gain-loss-arrow-badge
:cost-basis="$holding->average_cost_basis"
:market-value="$holding->market_data->market_value"
/>
</x-slot:value>
<x-slot:sub-value>
{{ $holding->portfolio->title }}
</x-slot:sub-value>
</x-ui.list-item>
@endforeach
</div>