holdings wip

This commit is contained in:
hackerESQ
2024-08-26 21:34:13 -05:00
parent 92bd91ef2c
commit 2b384758ff
6 changed files with 107 additions and 5 deletions
+13 -2
View File
@@ -2,15 +2,26 @@
namespace App\Http\Controllers;
use App\Models\Holding;
use App\Models\Portfolio;
use Illuminate\Http\Request;
class HoldingController extends Controller
{
/**
* Display the specified resource.
*/
public function show()
public function show(Request $request, Portfolio $portfolio, String $symbol)
{
return view('holding.index');
$holding = Holding::where([
'portfolio_id' => $portfolio->id,
'symbol' => $symbol
])->firstOrFail();
$market_data = $holding->market_data;
return view('holding.show', compact(['portfolio', 'holding', 'market_data']));
}
}