test dashboard data
This commit is contained in:
hackerESQ
2024-08-06 22:59:17 -05:00
parent 38e07cadd7
commit eb260b2990
10 changed files with 205 additions and 227 deletions
@@ -0,0 +1,26 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use stdClass;
class DashboardController extends Controller
{
/**
* Display the specified resource.
*/
public function show(Request $request)
{
$user = $request->user()->load('portfolios');
$dashboard = new stdClass;
$dashboard->marketGainLoss = rand(-200, 3999);
$dashboard->totalCostBasis = rand(-200, 3999);
$dashboard->totalMarketValue = rand(-200, 3999);
$dashboard->realizedGainLoss = rand(-200, 3999);
$dashboard->dividendsEarned = rand(-200, 3999);
return view('dashboard', compact('user', 'dashboard'));
}
}
@@ -20,6 +20,13 @@ class PortfolioController extends Controller
*/
public function show(Portfolio $portfolio)
{
$portfolio->marketGainLoss = rand(-200, 3999);
$portfolio->totalCostBasis = rand(-200, 3999);
$portfolio->totalMarketValue = rand(-200, 3999);
$portfolio->realizedGainLoss = rand(-200, 3999);
$portfolio->dividendsEarned = rand(-200, 3999);
return view('portfolio.show', compact('portfolio'));
}
}