wip
improve import / export flow and clean up relationships
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Holding;
|
||||
use App\Models\Portfolio;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -15,14 +14,12 @@ class HoldingController extends Controller
|
||||
public function show(Request $request, Portfolio $portfolio, String $symbol)
|
||||
{
|
||||
|
||||
$holding = $portfolio->holdings()
|
||||
->with(['market_data'])
|
||||
->symbol($symbol)
|
||||
->portfolio($portfolio->id)
|
||||
->first();
|
||||
|
||||
$holding = Holding::query()
|
||||
->portfolio($portfolio->id)
|
||||
->symbol($symbol)
|
||||
->first();
|
||||
|
||||
$market_data = $holding->market_data;
|
||||
|
||||
return view('holding.show', compact(['portfolio', 'holding', 'market_data']));
|
||||
return view('holding.show', compact(['portfolio', 'holding']));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user