diff --git a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php index 7f23db3..8a249ad 100644 --- a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php +++ b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php @@ -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)) { diff --git a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php index 71623a5..607086a 100644 --- a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php +++ b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php @@ -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 { diff --git a/app/Http/Controllers/GlobalPrivateCreditController.php b/app/Http/Controllers/GlobalPrivateCreditController.php index eb06846..e39db23 100644 --- a/app/Http/Controllers/GlobalPrivateCreditController.php +++ b/app/Http/Controllers/GlobalPrivateCreditController.php @@ -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); + } + } } diff --git a/app/Imports/FundImport.php b/app/Imports/FundImport.php index 4b71e36..a31ebac 100644 --- a/app/Imports/FundImport.php +++ b/app/Imports/FundImport.php @@ -74,6 +74,8 @@ class FundImport implements ToCollection, WithHeadingRow $init = 18; } else if($this->category_id == Category::GlobalVentureDebtId){ $init = 18; + } else if($this->category_id == Category::GlobalPrivateCreditFundId){ + $init = 18; } $returns = array(); @@ -106,7 +108,7 @@ class FundImport implements ToCollection, WithHeadingRow 'ytd' => $row['ytd'], 'year1_return' => $row['1_year_return'], 'year3_return' => $row['3_year_return'], - 'data_as_on' => $row['data_as_on'] + 'data_as_on' => $row['data_as_on'] ?? null, ]); if ($returns) { foreach ($returns as $key => $value) { diff --git a/app/Models/Category.php b/app/Models/Category.php index ce5a9c5..31bb079 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -92,7 +92,7 @@ class Category extends Model const PrivateCreditFundId = 41; - const GlobalPrivateCreditFundId= 43; + const GlobalPrivateCreditFundId= 42; public function scopeActive($query) { diff --git a/app/Models/Product.php b/app/Models/Product.php index 6251085..899ae8d 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -187,7 +187,7 @@ class Product extends Model public function scopeGlobalPrivateCreditFund($query) { - return $query->where('categories_id', 43); + return $query->where('categories_id', 42); } public function scopeInfrastructureFund($query) @@ -265,6 +265,11 @@ class Product extends Model return $query->where(['categories_id' => Category::GlobalVentureCapitalFundId, 'tables_id' => 3, 'status' => true]); } + public function scopeGlobalPrivateCreditFunds($query) + { + return $query->where(['categories_id' => Category::GlobalPrivateCreditFundId, 'tables_id' => 3, 'status' => true]); + } + public function scopeGlobalPrivateEquityFund($query) { return $query->where(['categories_id' => Category::GlobalPrivateEquityFundId, 'tables_id' => 3, 'status' => true]); diff --git a/app/helper.php b/app/helper.php index d2d8b83..2197995 100644 --- a/app/helper.php +++ b/app/helper.php @@ -108,7 +108,7 @@ function routeForHandpickedInvestment($categoryId) Category::PrivateEquityFundId => 'alternative-investment-fund.private-equity-fund-product', Category::GlobalPrivateEquityFundId => 'alternative-investment-fund.private-equity-fund-product', Category::PrivateCreditFundId => 'alternative-investment-fund.private-credit-fund-product', - Category::GlobalPrivateCreditFundId => 'alternative-investment-fund.private-credit-fund-product', + Category::GlobalPrivateCreditFundId => 'global-private-credit-fund-product', Category::PrivateRealEstateFundId => 'alternative-investment-fund.private-real-estate-fund-product', Category::HedgeFundId => 'alternative-investment-fund.hedge-fund-product', // Category::LongOnlyFundId => 'alternative-investment-fund.hedge-fund-product', diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index 6f249a2..45cdba0 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -4486,6 +4486,61 @@ span.start { height: 400px; overflow-y: scroll; } + +/* */ + /*======responsive=====*/ @media (max-width: 2560px) { diff --git a/public/assets/uploads/fund_images/202404111316_1711435445_factsheet.jpg b/public/assets/uploads/fund_images/202404111316_1711435445_factsheet.jpg new file mode 100644 index 0000000..e22ed82 Binary files /dev/null and b/public/assets/uploads/fund_images/202404111316_1711435445_factsheet.jpg differ diff --git a/public/assets/uploads/fund_images/202404111316_image.png b/public/assets/uploads/fund_images/202404111316_image.png new file mode 100644 index 0000000..0513644 Binary files /dev/null and b/public/assets/uploads/fund_images/202404111316_image.png differ diff --git a/public/excel-template/InternationalPrivateCreditFundTemplate.xlsx b/public/excel-template/InternationalPrivateCreditFundTemplate.xlsx new file mode 100644 index 0000000..942cb79 Binary files /dev/null and b/public/excel-template/InternationalPrivateCreditFundTemplate.xlsx differ diff --git a/resources/views/Frontend/Pages/venture-capital-funds/product.blade.php b/resources/views/Frontend/Pages/venture-capital-funds/product.blade.php index 6d4fb84..bd5aa01 100644 --- a/resources/views/Frontend/Pages/venture-capital-funds/product.blade.php +++ b/resources/views/Frontend/Pages/venture-capital-funds/product.blade.php @@ -40,6 +40,36 @@
Target IRR: {{ $data->alternativeInvestmentFund->target_irr }} -
- {{--Tenure From Final Date: - {{ $data->alternativeInvestmentFund->tenure_from_final_date }}
--}} +1 yrs return: {{ $data->funds->year1_return }}% +
| +3 yrs return: + {{ $data->funds->year3_return }}%
{{ $data->alternativeInvestmentFund->description }}
+{{ substr($data->funds->fund_description, 0, 200) }}...