fix changes

This commit is contained in:
Ritikesh yadav
2024-04-26 12:23:43 +05:30
parent f558d436ec
commit cbd046de4b
10 changed files with 174 additions and 27 deletions

View File

@@ -57,11 +57,20 @@ class DashboardController extends Controller
public function getMarketplaceAIFSellerData()
{
$id = auth()->guard('users')->user()->id;
$market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_aif_sellers'])->get();
foreach ($market_place_data as $row) {
$row['marketplace_aif_sellers_data'] = MarketplaceAlternativeInvestmentFundSeller::where('id', $row->associated_id)->first();
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_aif_sellers'])->get();
// foreach ($market_place_data as $row) {
// $row['marketplace_aif_sellers_data'] = MarketplaceAlternativeInvestmentFundSeller::where('id', $row->associated_id)->first();
// }
// return $market_place_data;
$sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get();
// return $sellerData[0]->aif['name_of_the_aif_fund'];
if(count($sellerData->toArray()))
{
$market_place_data = $sellerData[0]->aif->toArray();
return $market_place_data;
}
return $market_place_data;
return $sellerData;
}
public function aifSoldInvestment()
@@ -103,11 +112,20 @@ class DashboardController extends Controller
public function getMarketplaceFRESellerData()
{
$id = auth()->guard('users')->user()->id;
$market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_fre_sellers'])->get();
foreach ($market_place_data as $row) {
$row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first();
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_fre_sellers'])->get();
// foreach ($market_place_data as $row) {
// $row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first();
// }
// return $market_place_data;
$sellerData = MarketplaceSellerForm::has('fre')->with('fre')->where('users_id',$id)->get();
// dd(count($sellerData->toArray()));
if(count($sellerData->toArray()))
{
$market_place_data = $sellerData[0]->fre->toArray();
return $market_place_data;
}
return $market_place_data;
return $sellerData;
// if($sellerData->toArray()->count())
}
public function getMarketplaceOPSellerData()
@@ -769,7 +787,7 @@ class DashboardController extends Controller
->join('marketplace_aif_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_aif_sellers.id')
->alernativeInvestmentFund()
->sold()
->where('listing_status', '!=', 'Hide')
// ->where('listing_status', '!=', 'Hide')
// ->where('marketplace_aif_sellers.listing_status', 'Hide')
->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment')
->get();
@@ -783,7 +801,7 @@ class DashboardController extends Controller
->join('marketplace_fre_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_fre_sellers.id')
->fractionalRealEstate()
->sold()
->where('listing_status', '!=', 'Hide')
// ->where('listing_status', '!=', 'Hide')
// ->where('marketplace_fre_sellers.listing_status', 'Hide')
->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price')
->get();