This commit is contained in:
hackerESQ
2024-08-27 21:17:54 -05:00
parent db01c27113
commit e21814714d
11 changed files with 129 additions and 41 deletions
+5 -6
View File
@@ -15,12 +15,11 @@ class HoldingController extends Controller
public function show(Request $request, Portfolio $portfolio, String $symbol)
{
$holding = $request->user()
->holdings()
->where([
'holdings.portfolio_id' => $portfolio->id,
'holdings.symbol' => $symbol
])->firstOrFail();
$holding = Holding::query()
->portfolio($portfolio->id)
->symbol($symbol)
->first();
$market_data = $holding->market_data;