diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php
index 1bb250e..15b3ace 100644
--- a/app/Http/Controllers/Admin/DashboardController.php
+++ b/app/Http/Controllers/Admin/DashboardController.php
@@ -324,8 +324,9 @@ class DashboardController extends Controller
}
}
- public function readSpecificNotification($id){
+ public function readSpecificNotification(Request $request){
// dd($request->all());
+ $id = $request->id;
if($id){
$notification = auth()->user()->unreadNotifications->where('id', $id)->markAsRead();
// if(!$notification){
diff --git a/app/Http/Controllers/Admin/ManageFreeUInvestments/FractionalRealEstateController.php b/app/Http/Controllers/Admin/ManageFreeUInvestments/FractionalRealEstateController.php
index cf8252d..4ffc25e 100644
--- a/app/Http/Controllers/Admin/ManageFreeUInvestments/FractionalRealEstateController.php
+++ b/app/Http/Controllers/Admin/ManageFreeUInvestments/FractionalRealEstateController.php
@@ -252,6 +252,13 @@ class FractionalRealEstateController extends Controller
return $this->returnData($revenueBasedFinancing);
}
+ public function globalPCFQuestionAndAnswer()
+ {
+
+ $globalPrivateCreditFund = FAQ::where('tag_id', Tag::GlobalPrivateCreditFundId)->active()->where('faq_type', '0')->get();
+ return $this->returnData($globalPrivateCreditFund);
+ }
+
// faqs
public function revenueBasedFinancingQuestionAndAnswerFaqs()
{
diff --git a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php
index b624eff..7603e48 100644
--- a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php
+++ b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php
@@ -10,6 +10,7 @@ use App\Http\Resources\AngelFundResource;
use App\Http\Resources\HedgeFundResource;
use App\Models\AlternativeInvestmentFund;
use App\Http\Resources\PrivateEquityFundResource;
+use App\Http\Resources\PrivateCreditFundResource;
use App\Http\Resources\InfrastructureFundResource;
use App\Http\Resources\VentureCapitalFundResource;
use App\Http\Resources\FractionalRealEstate as test;
@@ -503,9 +504,34 @@ class AlternativeInvestmentFundController extends Controller
$learnMore = (new FractionalRealEstateFrontendController)->pcfQuestionAndAnswer()->getData();
return view('Frontend.Pages.private-credit-fund.index', [
'learnMore' => $learnMore,
- // 'openFFDA' => $this->aif->openPCF()->getData(),
- // 'fullyFundedFFDA' => $this->aif->fullyFundedFFDA()->getData(),
- // 'resaleFFDA' => $this->aif->resaleFFDA()->getData(),
+ 'openPCF' => $this->aif->openPCF()->getData(),
+ 'resalePCF' => $this->aif->resalePCF()->getData(),
]);
}
+
+ public function privateCreditFundProductData($slug)
+ {
+ try {
+ return (new PrivateCreditFundResource(AlternativeInvestmentFund::where('slug', $slug)->first()))
+ ->response()
+ ->setStatusCode(200);
+ } catch (\Exception $e) {
+ return response()->json(['message' => $e->getMessage()], 400);
+ }
+ }
+
+ public function privateCreditFundProduct($slug)
+ {
+ $privateCreditFund = $this->privateCreditFundProductData($slug)->getData()->data;
+ $otherPEF = AlternativeInvestmentFund::query()
+ ->join('products', 'alternative_investment_funds.products_id', 'products.id')
+ ->join('companies', 'alternative_investment_funds.companies_id', 'companies.id')
+ ->where(['products.status' => true, 'categories_id' => 31])
+ ->where('slug', '!=', $slug)
+ ->get();
+ $productData = AlternativeInvestmentFund::where('slug', '=', $slug)->first();
+ $productData = Product::where('id', '=', $productData->products_id)->first();
+ // dd($privateCreditFund);
+ return view('Frontend.Pages.alternative-investment-fund.private-credit-fund-product', compact('privateCreditFund', 'otherPEF', 'productData'));
+ }
}
diff --git a/app/Http/Controllers/Frontend/HomeController.php b/app/Http/Controllers/Frontend/HomeController.php
index 42b0d72..d650627 100644
--- a/app/Http/Controllers/Frontend/HomeController.php
+++ b/app/Http/Controllers/Frontend/HomeController.php
@@ -28,13 +28,14 @@ class HomeController extends Controller
public function index()
{
// dd($this->getAllTopPickProducts());
- return view('Frontend.Pages.index',[
+ return view('Frontend.Pages.index', [
'topPicks' => $this->getAllTopPickProducts()
]);
}
- public function getAllTopPickProducts(){
- $data['data'] = Product::getAllDetails()->where('top_pick',true)->get();
+ public function getAllTopPickProducts()
+ {
+ $data['data'] = Product::getAllDetails()->where('top_pick', true)->get();
// foreach($data['data'] as $row)
// {
// $category = Category::where('category_name', '=', $row->category_name)->first();
@@ -43,9 +44,10 @@ class HomeController extends Controller
return $data;
}
- public function productFilter(Request $request){
- $userInput = trim($request->filter[0],'[,]');
-
+ public function productFilter(Request $request)
+ {
+ $userInput = trim($request->filter[0], '[,]');
+
$minimumInvestment = [
1 => [
// 'symbol' => '>',
@@ -78,7 +80,7 @@ class HomeController extends Controller
$key['indian-real-assets'] = true;
$key['global-financial-assets'] = false;
$key['global-real-assets'] = true;
- foreach (explode(',',$userInput) as $filter) {
+ foreach (explode(',', $userInput) as $filter) {
if ($key['indian-financial-assets'] == false) {
$key['indian-financial-assets'] = $this->checkIFAFilter($minimumInvestment[$filter]['less_than'], $minimumInvestment[$filter]['greater_than']);
}
@@ -120,12 +122,12 @@ class HomeController extends Controller
if (!auth()->guard('users')->check()) {
return response()->json(['status' => 201, 'message' => 'Please Login To Invest']);
}
-
- $checkUserBlock = User::where(['id' => auth()->guard('users')->user()->id, 'status' => 1 ])->doesntExist();
- if($checkUserBlock){
+
+ $checkUserBlock = User::where(['id' => auth()->guard('users')->user()->id, 'status' => 1])->doesntExist();
+ if ($checkUserBlock) {
return response()->json(['status' => 403, 'message' => "Please contact us"]);
}
-
+
$addLead = Lead::create([
'users_id' => auth()->guard('users')->user()->id,
'lead_owner' => null,
@@ -139,7 +141,8 @@ class HomeController extends Controller
if ($addLead) {
$userName = auth()->guard('users')->user()->name;
$notify['message'] = "$userName is interested in a product!";
- $type = "Buyer Form";
+ // $type = "Buyer Form";
+ $type = "New Leads";
$users = User::admins()->get();
foreach ($users as $data) {
$data->notify(new UserAdmin($notify, $type));
@@ -197,37 +200,37 @@ class HomeController extends Controller
{
$user = User::find($request->user()->id);
$dataArray = array();
- foreach($user->unreadNotifications as $data)
- {
+ foreach ($user->unreadNotifications as $data) {
$notify['id'] = $data->id;
$notify['message'] = $data->data['message'];
$notify['time'] = $data->created_at->diffForHumans();
- array_push($dataArray,$notify);
+ array_push($dataArray, $notify);
}
// array_push($notificationArray,$dataArray);
$notificationArray['data'] = $dataArray;
return $notificationArray;
}
- public function updateSingleNotification($id){
- if(!$id){
- return response()->json(['status' => 400, 'message' => 'Error Marking it as read!'],400);
+ public function updateSingleNotification($id)
+ {
+ if (!$id) {
+ return response()->json(['status' => 400, 'message' => 'Error Marking it as read!'], 400);
};
$user = User::find(request()->user()->id);
$user->notifications->where('id', $id)->markAsRead();
return response()->json(['status' => 200, 'message' => 'Notification mark as read']);
}
- public function checkPin(Request $request){
- if(!$request->pin){
- return response()->json(['message'=> 'Please Enter Pin!'],400);
+ public function checkPin(Request $request)
+ {
+ if (!$request->pin) {
+ return response()->json(['message' => 'Please Enter Pin!'], 400);
}
$pin = User::find($request->user()->id);
- if($request->pin == $pin->pin){
- return response()->json(['message'=> 'Pin Matched!'],200);
+ if ($request->pin == $pin->pin) {
+ return response()->json(['message' => 'Pin Matched!'], 200);
}
- return response()->json(['message'=> 'Pin did not matched!'],400);
-
+ return response()->json(['message' => 'Pin did not matched!'], 400);
}
public function validationError($validator)
diff --git a/app/Http/Controllers/GlobalPrivateCreditController.php b/app/Http/Controllers/GlobalPrivateCreditController.php
new file mode 100644
index 0000000..e8a884e
--- /dev/null
+++ b/app/Http/Controllers/GlobalPrivateCreditController.php
@@ -0,0 +1,19 @@
+globalPCFQuestionAndAnswer()->getData();
+ return view('Frontend.Pages.dummy.global-private-credit',[
+ 'learnMore'=>$learnMore,
+ // 'openGPCF'=>$learnMore,
+ // 'resaleGPCF'=>$learnMore,
+ ]);
+ }
+}
diff --git a/app/Http/Resources/PrivateCreditFundResource.php b/app/Http/Resources/PrivateCreditFundResource.php
new file mode 100644
index 0000000..2fa6820
--- /dev/null
+++ b/app/Http/Resources/PrivateCreditFundResource.php
@@ -0,0 +1,19 @@
+where('status', true);
diff --git a/app/Services/Frontend/AIFService.php b/app/Services/Frontend/AIFService.php
index 86524f2..8c28419 100644
--- a/app/Services/Frontend/AIFService.php
+++ b/app/Services/Frontend/AIFService.php
@@ -30,6 +30,11 @@ class AIFService{
return $this->returnResponse(Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies','categorys')->ventureCapitalFund()->fullyFunded()->active()->latest()->get());
}
+ public function resalePCF()
+ {
+ return $this->returnResponse(Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies','categorys')->privateCreditFund()->resale()->active()->latest()->get());
+ }
+
public function resaleVCF()
{
return $this->returnResponse(Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies','categorys')->ventureCapitalFund()->resale()->active()->latest()->get());
diff --git a/app/View/Components/PrivateCreditFundProduct.php b/app/View/Components/PrivateCreditFundProduct.php
new file mode 100644
index 0000000..978a261
--- /dev/null
+++ b/app/View/Components/PrivateCreditFundProduct.php
@@ -0,0 +1,31 @@
+pcfAllData = $pcfData;
+ $this->type = $type;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ *
+ * @return \Illuminate\Contracts\View\View|\Closure|string
+ */
+ public function render()
+ {
+ return view('components.private-credit-fund-product');
+ }
+}
diff --git a/app/helper.php b/app/helper.php
index d9cf403..f7fc4b0 100644
--- a/app/helper.php
+++ b/app/helper.php
@@ -37,19 +37,16 @@ if (!function_exists('validationErrorMessage')) {
function imagePath($path = null)
{
- if(env('APP_ENV') == 'production')
- {
+ if (env('APP_ENV') == 'production') {
$finalPath = "https://jerichoalternatives.in/";
}
- if(env('APP_ENV') == 'staging')
- {
+ if (env('APP_ENV') == 'staging') {
$finalPath = "https://staging.jerichoalternatives.in/";
}
- if(env('APP_ENV') == 'local')
- {
- $finalPath = "http://localhost/my-freeu/";
+ if (env('APP_ENV') == 'local') {
+ $finalPath = "http://localhost/jericho_28_march/";
}
- return $finalPath.$path;
+ return $finalPath . $path;
}
function routeForHandpickedInvestment($categoryId)
@@ -109,7 +106,7 @@ function routeForHandpickedInvestment($categoryId)
Category::AngelFundId => 'alternative-investment-fund.angel-fund-product',
Category::PrivateEquityFundId => 'alternative-investment-fund.private-equity-fund-product',
Category::GlobalPrivateEquityFundId => 'alternative-investment-fund.private-equity-fund-product',
- Category::DebtFundId => 'alternative-investment-fund.debt-fund-product',
+ Category::PrivateCreditFundId => 'alternative-investment-fund.private-credit-fund-product',
Category::PrivateRealEstateFundId => 'alternative-investment-fund.private-real-estate-fund-product',
Category::HedgeFundId => 'alternative-investment-fund.hedge-fund-product',
Category::PrivateInvestmentInPublicEquityFundId => 'alternative-investment-fund.private-investment-public-equity-product',
@@ -331,9 +328,29 @@ function getCategoryIcons($categoryId)
{
$category_icons = [
"public/assets/media/FrontendImages/fract-state.svg" => Category::FractionalRealEstateId,
- "public/assets/media/FrontendImages/capital-funds.svg" => Category::VentureCapitalFundId,
+ "public/assets/media/FrontendImages/capital-funds.svg" => Category::VentureCapitalFundId, // aif product icons start from here
"public/assets/media/FrontendImages/comm-real-state.svg" => Category::IndianCommercialRealEstateID,
"public/assets/media/FrontendImages/stra-fund.svg" => Category::HedgeFundId,
+ "public/assets/media/FrontendImages/assets-funds.svg" => Category::FundForDistressedAssetId, // new category start from here
+ "public/assets/media/FrontendImages/private.svg" => Category::PrivateRealEstateFundId,
+ "public/assets/media/FrontendImages/bay-arrow.svg" => Category::LongOnlyFundId,
+ "public/assets/media/FrontendImages/Infr-funds.svg" => Category::InfrastructureFundId,
+ // "public/assets/media/FrontendImages/cradit-funds.svg" => Category::PrivateCreditFundId,
+ "public/assets/media/FrontendImages/cradit-funds.svg" => 40,
+ "public/assets/media/FrontendImages/equity-funds.svg" => Category::PrivateEquityFundId,
+ "public/assets/media/FrontendImages/angel-funds.svg" => Category::AngelFundId,
+ "public/assets/media/FrontendImages/stra-fund.svg" => Category::HedgeFundId,
+ "public/assets/media/FrontendImages/pipe-funds.svg" => Category::PrivateInvestmentInPublicEquityFundId,
+ "public/assets/media/FrontendImages/stra-fund.svg" => Category::GlobalHedgeFundId, //global product icons start from here
+ // "public/assets/media/FrontendImages/cradit-funds.svg" => Category::GlobalPrivateCreditFundId,
+ "public/assets/media/FrontendImages/equity-funds.svg" => Category::GlobalPrivateEquityFundId,
+ "public/assets/media/FrontendImages/capital-funds.svg" => Category::GlobalVentureCapitalFundId,
+ "public/assets/media/FrontendImages/login-img/alternative.svg" => Category::IndianIndustrialRealEstateID, // indain real estate start from here
+ "public/assets/media/FrontendImages/resi-real-state.svg" => Category::IndianResidentialRealEstateID,
+ "public/assets/media/FrontendImages/comm-real-state.svg" => Category::IndianCommercialRealEstateID,
+ "public/assets/media/FrontendImages/login-img/alternative.svg" => Category::GlobalIndustrialRealEstateID, // global real estate start from here
+ "public/assets/media/FrontendImages/resi-real-state.svg" => Category::GlobalResidentialRealEstateID,
+ "public/assets/media/FrontendImages/comm-real-state.svg" => Category::GlobalCommercialRealEstateID,
];
$condition = array_search($categoryId, $category_icons);
return $condition == true ? $condition : 'public/assets/media/FrontendImages/bay-arrow.svg';
diff --git a/public/assets/js/FrontendJs/script.js b/public/assets/js/FrontendJs/script.js
index bb2cc45..65bf79f 100644
--- a/public/assets/js/FrontendJs/script.js
+++ b/public/assets/js/FrontendJs/script.js
@@ -35,11 +35,11 @@ window.$('#currently').DataTable({
});
$("#recipes-popbtn-four").on("click", function () {
- // var url = '{{route("investNow"),["product_id"=>"'+$(this).data('product-id')+'"]}}';
+ // var investNowUrl = '{{route("investNow")}}';
$.ajax({
url : '/invest-now',
// url : '{{route("investNow")}}',
- // url : url,
+ // url : investNowUrl,
type: 'get',
data : {
product_id : $(this).data('product-id')
diff --git a/resources/views/Admin/footer.blade.php b/resources/views/Admin/footer.blade.php
index aa730df..b7cf2e7 100644
--- a/resources/views/Admin/footer.blade.php
+++ b/resources/views/Admin/footer.blade.php
@@ -16,9 +16,12 @@ $url_name = request()->segment(count(request()->segments()));
@@ -34,13 +37,15 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
@@ -48,44 +53,45 @@ $url_name = request()->segment(count(request()->segments()));
// function readNotification(notificationId){
// alert(notificationId);
// }
- $(document).on('click','.notify_id',function(){
+ $(document).on('click', '.notify_id', function() {
var id = $(this).data('notify-id');
// alert(id);
- $.ajaxSetup({
+ $.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
$.ajax({
- url:"/dashboard/read-notification/"+id,
- type:"GET",
+ // url:"/dashboard/read-notification/"+id,
+ url: "{{ route('read-notification') }}",
+ type: "GET",
data:{'id': id},
- dataType:'json',
+ dataType: 'json',
// processData:false,
// contentType:false,
- success:function(result){
+ success: function(result) {
// toastr.success(result.message);
- if(result.status == 200){
+ if (result.status == 200) {
// console.log(result.data.newUser);
- if(result.data.newUser){
+ if (result.data.newUser) {
$('#user-tab').empty().html(result.data.newUser);
}
- if(result.data.submittedKyc){
+ if (result.data.submittedKyc) {
$('#kyc-tab').empty().html(result.data.submittedKyc);
}
- if(result.data.sellerForm){
+ if (result.data.sellerForm) {
$('#seller-tab').empty().html(result.data.sellerForm);
}
- if(result.data.buyerForm){
+ if (result.data.buyerForm) {
$('#buyer-tab').empty().html(result.data.buyerForm);
}
- if(result.data.contactUs){
+ if (result.data.contactUs) {
$('#contact').empty().html(result.data.contactUs);
}
- if(result.data.leadAssigned){
+ if (result.data.leadAssigned) {
$('#leads').empty().html(result.data.leadAssigned);
}
- }else{
+ } else {
toastr.warning(result.message);
}
}
@@ -104,19 +110,19 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -124,7 +130,9 @@ $url_name = request()->segment(count(request()->segments()));
-
+
@@ -134,7 +142,7 @@ $url_name = request()->segment(count(request()->segments()));
-
+
@@ -144,7 +152,7 @@ $url_name = request()->segment(count(request()->segments()));
-
+
@@ -154,31 +162,31 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
-
+
-
+
@@ -186,31 +194,31 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-{{----}}
+{{-- --}}
-
+
-
+
-
+
-
+
@@ -220,43 +228,43 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -266,37 +274,37 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
-
+
-
+
-
+
@@ -306,7 +314,7 @@ $url_name = request()->segment(count(request()->segments()));
-
+
@@ -318,15 +326,15 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
@@ -336,17 +344,17 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
@@ -354,15 +362,15 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
@@ -372,17 +380,17 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
-
+
@@ -392,19 +400,19 @@ $url_name = request()->segment(count(request()->segments()));
-
+
-
+
-
+
@@ -412,7 +420,7 @@ $url_name = request()->segment(count(request()->segments()));
-
+
@@ -434,15 +442,15 @@ $url_name = request()->segment(count(request()->segments()));