fixed api
This commit is contained in:
@@ -47,14 +47,14 @@ class DashboardController extends Controller
|
||||
$freInvestmentListed = $this->freInvestmentListed()['data'];
|
||||
$opInvestmentListed = $this->opInvestmentListed()['data'];
|
||||
//
|
||||
$marketPlaceAIFSellerData = $this->getMarketplaceAIFSellerData();
|
||||
$marketPlaceFRESellerData = $this->getMarketplaceFRESellerData();
|
||||
$marketPlaceAIFSellerData = $this->getMarketplaceAIFSellerData(1);
|
||||
$marketPlaceFRESellerData = $this->getMarketplaceFRESellerData(1);
|
||||
$marketPlaceOPSellerData = $this->getMarketplaceOPSellerData();
|
||||
$totalInvestmentTillDate = '₹ ' . $this->IND_money_format($currentInvestmentProduct['totalInvestmentInInt'] + $reedemedInvestmentProduct['totalInvestmentInInt']);
|
||||
return view('Frontend.Pages.profile.dashboard', compact('currentInvestmentProduct', 'reedemedInvestmentProduct', 'totalInvestmentTillDate', 'aifInvestmentWatchlist', 'freInvestmentWatchlist', 'opInvestmentWatchlist', 'aifSoldInvestmentWatchlist', 'freSoldInvestmentWatchlist', 'opSoldInvestmentWatchlist', 'user', 'aifInvestmentListed', 'freInvestmentListed', 'opInvestmentListed', 'marketPlaceAIFSellerData', 'marketPlaceFRESellerData', 'marketPlaceOPSellerData'));
|
||||
}
|
||||
|
||||
public function getMarketplaceAIFSellerData()
|
||||
public function getMarketplaceAIFSellerData($api = null)
|
||||
{
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_aif_sellers'])->get();
|
||||
@@ -66,9 +66,16 @@ class DashboardController extends Controller
|
||||
$sellerData = MarketplaceSellerForm::with('aif')->where('users_id',$id)->get();
|
||||
// dd($sellerData);
|
||||
// return $sellerData[0]->aif['name_of_the_aif_fund'];
|
||||
// return $api;
|
||||
if($api == null)
|
||||
{
|
||||
$data['data'] = $sellerData;
|
||||
return $data;
|
||||
}
|
||||
if(count($sellerData->toArray()))
|
||||
{
|
||||
$market_place_data = $sellerData[0]->aif->toArray();
|
||||
// dd($market_place_data);
|
||||
return $market_place_data;
|
||||
}
|
||||
return $sellerData;
|
||||
@@ -111,7 +118,7 @@ class DashboardController extends Controller
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getMarketplaceFRESellerData()
|
||||
public function getMarketplaceFRESellerData($api = null)
|
||||
{
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_fre_sellers'])->get();
|
||||
@@ -121,6 +128,11 @@ class DashboardController extends Controller
|
||||
// return $market_place_data;
|
||||
$sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get();
|
||||
// dd(count($sellerData->toArray()));
|
||||
if($api == null)
|
||||
{
|
||||
$data['data'] = $sellerData;
|
||||
return $data;
|
||||
}
|
||||
if(count($sellerData->toArray()))
|
||||
{
|
||||
$market_place_data = $sellerData[0]->fre->toArray();
|
||||
|
||||
Reference in New Issue
Block a user