This commit is contained in:
hackerESQ
2024-08-26 22:13:00 -05:00
parent 65817157c2
commit 10b6c7cda2
6 changed files with 60 additions and 14 deletions
+6 -4
View File
@@ -15,10 +15,12 @@ class HoldingController extends Controller
public function show(Request $request, Portfolio $portfolio, String $symbol)
{
$holding = Holding::where([
'portfolio_id' => $portfolio->id,
'symbol' => $symbol
])->firstOrFail();
$holding = $request->user()
->holdings()
->where([
'holdings.portfolio_id' => $portfolio->id,
'holdings.symbol' => $symbol
])->firstOrFail();
$market_data = $holding->market_data;