Merge branch 'main' of https://github.com/Ritikeshyadav/my-freeu into HritikFreeu

This commit is contained in:
Hritikkk9
2024-04-11 19:04:16 +05:30
15 changed files with 181 additions and 20 deletions

View File

@@ -410,7 +410,7 @@ class ManageFreeUInvestmentController extends Controller
3 => ['id' => Category::GlobalPrivateEquityFundId, 'file' => 'InternationalPrivateEquityFundTemplate'],
4 => ['id' => Category::GlobalVentureDebtId, 'file' => 'RealEstateInvestmentTrustsTemplate'],
5 => ['id' => Category::GlobalHedgeFundId, 'file' => 'InternationalHedgeFundTemplate'],
6 => ['id' => Category::GlobalPrivateCreditFundId, 'file' => 'PrivateCreditTemplate'],
6 => ['id' => Category::GlobalPrivateCreditFundId, 'file' => 'InternationalPrivateCreditFundTemplate'],
];
if (!array_key_exists($id, $exchangeData)) {

View File

@@ -471,6 +471,17 @@ class AlternativeInvestmentFundController extends Controller
}
}
public function longOnlyEquityFundAllData($type = 'Open')
{
try {
return (new test(Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies')->longOnlyEquityFund()->active()->get()))
->response()
->setStatusCode(200);
} catch (\Exception $e) {
return response()->json(['message' => $e->getMessage()], 400);
}
}
public function longOnlyEquityFundData($slug)
{
try {
@@ -482,6 +493,28 @@ class AlternativeInvestmentFundController extends Controller
}
}
public function privateCreditFundAllData($type = 'Open')
{
try {
return (new test(Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies')->privateCreditFund()->active()->get()))
->response()
->setStatusCode(200);
} catch (\Exception $e) {
return response()->json(['message' => $e->getMessage()], 400);
}
}
public function privateCreditFundData($slug)
{
try {
return (new LongOnlyEquityResource(AlternativeInvestmentFund::where('slug', $slug)->first()))
->response()
->setStatusCode(200);
} catch (\Exception $e) {
return response()->json(['message' => $e->getMessage()], 400);
}
}
public function pipeAllData($type = 'Open')
{
try {

View File

@@ -5,16 +5,40 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Admin\ManageFreeUInvestments\FractionalRealEstateController as FractionalRealEstateFrontendController;
use App\Models\Product;
use App\Models\Fund;
use App\Http\Resources\FractionalRealEstate as test;
class GlobalPrivateCreditController extends Controller
{
public function getGlobalPrivateCreditFundPage()
{
// dd(Product::has('funds')->with('funds')->funds()->globalPrivateCreditFund()->open()->active()->latest()->get());
$learnMore = (new FractionalRealEstateFrontendController)->globalPCFQuestionAndAnswer()->getData();
return view('Frontend.Pages.dummy.global-private-credit',[
'learnMore'=>$learnMore,
'openGPCF'=> Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies','categorys')->globalPrivateCreditFund()->open()->active()->latest()->get(),
'resaleGPCF'=> Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies','categorys')->globalPrivateCreditFund()->resale()->active()->latest()->get(),
return view('Frontend.Pages.dummy.global-private-credit', [
'learnMore' => $learnMore,
'openGPCF' => Product::has('funds')->with('funds')->funds()->globalPrivateCreditFund()->open()->active()->latest()->get(),
// 'resaleGPCF' => Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies', 'categorys')->globalPrivateCreditFund()->resale()->active()->latest()->get(),
'resaleGPCF' => Product::has('funds')->with('funds')->funds()->globalPrivateCreditFund()->resale()->active()->latest()->get(),
]);
}
public function getGlobalPrivateCreditFundProduct($slug)
{
$ventureCapitalFund = Fund::where('slug', $slug)->first();
$productData = Fund::where('slug', '=', $slug)->first();
$productData = Product::where('id', '=', $productData->products_id)->first();
// dd($ventureCapitalFund);
return view('Frontend.Pages.venture-capital-funds.product', compact('ventureCapitalFund', 'productData'));
}
public function privateCreditAllData($type)
{
try {
return (new test(Product::has('funds')->with('funds')->where('type', $type)->funds()->globalPrivateCreditFunds()->get()))
->response()
->setStatusCode(200);
} catch (\Exception $e) {
return response()->json(['message' => $e->getMessage()], 400);
}
}
}