From 3f12c0b64b88394ed046e0ed53a180b941cf9bc4 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 11:12:36 +0530 Subject: [PATCH 01/12] fixed manage sub admin checkbox issue --- resources/views/Admin/add-sub-admin.blade.php | 20 +++++++++++-------- .../views/Admin/edit-sub-admin.blade.php | 20 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/resources/views/Admin/add-sub-admin.blade.php b/resources/views/Admin/add-sub-admin.blade.php index 82f4c74..4b8c03b 100644 --- a/resources/views/Admin/add-sub-admin.blade.php +++ b/resources/views/Admin/add-sub-admin.blade.php @@ -1149,12 +1149,12 @@ $('#manage_sub_admin').click(function() { if ($('#manage_sub_admin').prop('checked') == true) { checkCheckbox('#sub_admin'); - checkCheckbox('#user_list'); - checkCheckbox('#update_user_password'); + // checkCheckbox('#user_list'); + // checkCheckbox('#update_user_password'); } else { unCheckCheckbox('#sub_admin'); - unCheckCheckbox('#user_list'); - unCheckCheckbox('#update_user_password'); + // unCheckCheckbox('#user_list'); + // unCheckCheckbox('#update_user_password'); } checkSubAdmin(); }); @@ -1184,8 +1184,10 @@ '#manage_blogs').prop('checked') == false || $('#manage_faq').prop('checked') == false || $('#manage_testimonial').prop('checked') == false || $('#privacy_policy').prop('checked') == false || $( '#terms_and_conditions').prop('checked') == false || $('#manage_sub_admin').prop('checked') == false || - $('#sub_admin').prop('checked') == false || $('#user_list').prop('checked') == false || - $('#update_user_password').prop('checked') == false || $('#manage_lead').prop('checked') == false || $( + $('#sub_admin').prop('checked') == false || + // $('#user_list').prop('checked') == false || + // $('#update_user_password').prop('checked') == false || + $('#manage_lead').prop('checked') == false || $( '#contact_us_form').prop('checked') == false) { unCheckCheckbox('#admin_user'); checkCheckbox('#sub_admin_user'); @@ -1310,8 +1312,10 @@ // manage sub admin function checkManageSubAdminCheckBox() { - if ($('#sub_admin').prop('checked') == true || $('#user_list').prop('checked') == true || $( - '#update_user_password').prop('checked') == true) { + if ($('#sub_admin').prop('checked') == true + // || $('#user_list').prop('checked') == true + // || $('#update_user_password').prop('checked') == true + ) { if ($('#manage_sub_admin').prop('checked') == false) { checkCheckbox('#manage_sub_admin'); } diff --git a/resources/views/Admin/edit-sub-admin.blade.php b/resources/views/Admin/edit-sub-admin.blade.php index 945593f..53a0a3a 100644 --- a/resources/views/Admin/edit-sub-admin.blade.php +++ b/resources/views/Admin/edit-sub-admin.blade.php @@ -1170,12 +1170,12 @@ $('#manage_sub_admin').click(function() { if ($('#manage_sub_admin').prop('checked') == true) { checkCheckbox('#sub_admin'); - checkCheckbox('#user_list'); - checkCheckbox('#update_user_password'); + // checkCheckbox('#user_list'); + // checkCheckbox('#update_user_password'); } else { unCheckCheckbox('#sub_admin'); - unCheckCheckbox('#user_list'); - unCheckCheckbox('#update_user_password'); + // unCheckCheckbox('#user_list'); + // unCheckCheckbox('#update_user_password'); } checkSubAdmin(); }); @@ -1205,8 +1205,10 @@ '#manage_blogs').prop('checked') == false || $('#manage_faq').prop('checked') == false || $('#manage_testimonial').prop('checked') == false || $('#privacy_policy').prop('checked') == false || $( '#terms_and_conditions').prop('checked') == false || $('#manage_sub_admin').prop('checked') == false || - $('#sub_admin').prop('checked') == false || $('#user_list').prop('checked') == false || - $('#update_user_password').prop('checked') == false || $('#manage_lead').prop('checked') == false || $( + $('#sub_admin').prop('checked') == false || + // $('#user_list').prop('checked') == false || + // $('#update_user_password').prop('checked') == false || + $('#manage_lead').prop('checked') == false || $( '#contact_us_form').prop('checked') == false) { unCheckCheckbox('#admin_user'); checkCheckbox('#sub_admin_user'); @@ -1331,8 +1333,10 @@ // manage sub admin function checkManageSubAdminCheckBox() { - if ($('#sub_admin').prop('checked') == true || $('#user_list').prop('checked') == true || $( - '#update_user_password').prop('checked') == true) { + if ($('#sub_admin').prop('checked') == true + // || $('#user_list').prop('checked') == true || $( + // '#update_user_password').prop('checked') == true + ) { if ($('#manage_sub_admin').prop('checked') == false) { checkCheckbox('#manage_sub_admin'); } From 49598c32db4095a983d22b48366e53cb8dfecee5 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 12:43:25 +0530 Subject: [PATCH 02/12] added log and exceptions --- .../Frontend/DashboardController.php | 71 +++++++++++-------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index e4072ff..a365586 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -29,6 +29,7 @@ use Cviebrock\EloquentSluggable\Services\SlugService; use Illuminate\Support\Facades\Session; use DB; +use Illuminate\Support\Facades\Log; class DashboardController extends Controller { public function index() @@ -65,29 +66,35 @@ class DashboardController extends Controller 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(); - // 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(); - $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) + try{ + $id = auth()->guard('users')->user()->id ?? request()->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(); + // } + // return $market_place_data; + // $sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get(); + $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; + }catch(\Exception $e) { - $data['data'] = $sellerData; - return $data; + Log::error("Something went wrong while fetching aif sold investment - ". $e->getMessage() . " on ". $e->getLine()) + // Log::error("Something went wrong while investment-". $e->getMessage() ." " .$e->getLine()); } - if(count($sellerData->toArray())) - { - $market_place_data = $sellerData[0]->aif->toArray(); - // dd($market_place_data); - return $market_place_data; - } - return $sellerData; } @@ -187,14 +194,20 @@ class DashboardController extends Controller public function viewInvestmentDetails() { - $currentInvestmentProduct = $this->view_investors_details('Holding'); - $reedemedInvestmentProduct = $this->view_investors_details('Reedemed'); - $totalInvestmentTillDate = '₹ ' . $this->IND_money_format($currentInvestmentProduct['totalInvestmentInInt'] + $reedemedInvestmentProduct['totalInvestmentInInt']); - return [ - 'currentInvestmentProduct' => $currentInvestmentProduct, - 'reedemedInvestmentProduct' => $reedemedInvestmentProduct, - 'totalInvestmentTillDate' => $totalInvestmentTillDate, - ]; + try{ + + $currentInvestmentProduct = $this->view_investors_details('Holding'); + $reedemedInvestmentProduct = $this->view_investors_details('Reedemed'); + $totalInvestmentTillDate = '₹ ' . $this->IND_money_format($currentInvestmentProduct['totalInvestmentInInt'] + $reedemedInvestmentProduct['totalInvestmentInInt']); + return [ + 'currentInvestmentProduct' => $currentInvestmentProduct, + 'reedemedInvestmentProduct' => $reedemedInvestmentProduct, + 'totalInvestmentTillDate' => $totalInvestmentTillDate, + ]; + }catch(\Exception $e) + { + Log::error("Something went wrong while investment-". $e->getMessage() ." " .$e->getLine()); + } } public function investmentSummary() From a989ddc76cc09150b1767ef4bbccd77cc08daa00 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 12:45:40 +0530 Subject: [PATCH 03/12] added log and exceptions --- .../Frontend/DashboardController.php | 63 ++++++++++--------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index a365586..cb3078d 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -136,38 +136,45 @@ class DashboardController extends Controller 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(); - // foreach ($market_place_data as $row) { - // $row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first(); - // } - // return $market_place_data; - $sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get(); - // dd($sellerData); - $sellerData->each(function($value){ - $value->fre->each(function($fre){ - // dd($fre); - if($fre) - { - $fre['company_name'] = Company::where('id',$fre->fractional_real_estate_platform)->value('company_name'); - } - + try{ + $id = auth()->guard('users')->user()->id ?? request()->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(); + // } + // return $market_place_data; + $sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get(); + // dd($sellerData); + $sellerData->each(function($value){ + $value->fre->each(function($fre){ + // dd($fre); + if($fre) + { + $fre['company_name'] = Company::where('id',$fre->fractional_real_estate_platform)->value('company_name'); + } + + }); + // dd($value->fre[0]->fractional_real_estate_platform); }); - // dd($value->fre[0]->fractional_real_estate_platform); - }); - // dd($sellerData->toArray()); - if($api == null) - { - $data['data'] = $sellerData; - return $data; + // dd($sellerData->toArray()); + if($api == null) + { + $data['data'] = $sellerData; + return $data; + } + if(count($sellerData->toArray())) + { + $market_place_data = $sellerData[0]->fre->toArray(); + return $market_place_data; + } + return $sellerData; + // if($sellerData->toArray()->count()) } - if(count($sellerData->toArray())) + catch(\Exception $e) { - $market_place_data = $sellerData[0]->fre->toArray(); - return $market_place_data; + // Log::error('') + Log::error("Something went wrong while fetching fre sold investment -". $e->getMessage() ." " .$e->getLine()); } - return $sellerData; - // if($sellerData->toArray()->count()) } public function getMarketplaceOPSellerData() From 10bfffc8bffb317e4dc3a153969d775990c3b392 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 12:51:07 +0530 Subject: [PATCH 04/12] added log and exceptions --- .../Frontend/DashboardController.php | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index cb3078d..aa3baa0 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -849,7 +849,8 @@ class DashboardController extends Controller public function aifInvestmentWatchlist() { - $data['data'] = MarketplaceBuyerForm::query() + try{ + $data['data'] = MarketplaceBuyerForm::query() ->join('marketplace_aif_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_aif_sellers.id') ->alernativeInvestmentFund() ->where('listing_status', '!=', 'Hide') @@ -864,16 +865,23 @@ class DashboardController extends Controller 'marketplace_aif_sellers.type_of_fund', 'marketplace_aif_sellers.total_capital_commitment', 'marketplace_aif_sellers.uncalled_capital_commitment' - ) - ->get(); - // $data['data'] = MarketplaceBuyerForm::has('aifSellerData')->with('aifSellerData')->alernativeInvestmentFund()->notSold()->get(); - // dd($data['data']->toArray()); - return $data; + ) + ->get(); + // $data['data'] = MarketplaceBuyerForm::has('aifSellerData')->with('aifSellerData')->alernativeInvestmentFund()->notSold()->get(); + // dd($data['data']->toArray()); + return $data; + } + catch(\Exception $e) + { + Log::error("Something went wrong while fetching fre watchlist-". $e->getMessage() ." " .$e->getLine()); + } } public function freInvestmentWatchlist() { - $data['data'] = MarketplaceBuyerForm::query() + try{ + + $data['data'] = MarketplaceBuyerForm::query() // ->leftJoin('compaines', 'marketplace_fre_sellers.fractional_real_estate_platform', 'compaines.id') ->join('marketplace_fre_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_fre_sellers.id') // ->with('compaines') @@ -890,15 +898,20 @@ class DashboardController extends Controller 'marketplace_fre_sellers.asset_type', 'marketplace_fre_sellers.fractional_real_estate_platform', 'marketplace_fre_sellers.expected_selling_price' - ) + ) ->get(); - $data['data']->each(function($value){ - if($value->fractional_real_estate_platform != null) - { - $value->company_name = Company::where('id',$value->fractional_real_estate_platform)->value('company_name'); - } - }); - return $data; + $data['data']->each(function($value){ + if($value->fractional_real_estate_platform != null) + { + $value->company_name = Company::where('id',$value->fractional_real_estate_platform)->value('company_name'); + } + }); + return $data; + } + catch(\Exception $e) + { + Log::error("Something went wrong while fetching fre watchlist-". $e->getMessage() ." " .$e->getLine()); + } } public function opInvestmentWatchlist() From ed485a15f6cea25554a4f49107849a4c1a6e024f Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 12:54:34 +0530 Subject: [PATCH 05/12] added log and exceptions --- app/Http/Controllers/Frontend/DashboardController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index aa3baa0..5050f3d 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -92,7 +92,7 @@ class DashboardController extends Controller return $sellerData; }catch(\Exception $e) { - Log::error("Something went wrong while fetching aif sold investment - ". $e->getMessage() . " on ". $e->getLine()) + Log::error("Something went wrong while fetching aif sold investment - ". $e->getMessage() . " on ". $e->getLine()); // Log::error("Something went wrong while investment-". $e->getMessage() ." " .$e->getLine()); } From 9ade6b8de826d05925dcd4f8c7eee667c74043dd Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 13:05:49 +0530 Subject: [PATCH 06/12] logging file updated --- .../Frontend/DashboardController.php | 262 ++++++++---------- config/logging.php | 34 ++- 2 files changed, 154 insertions(+), 142 deletions(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index 5050f3d..3866a5b 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -30,6 +30,7 @@ use Illuminate\Support\Facades\Session; use DB; use Illuminate\Support\Facades\Log; + class DashboardController extends Controller { public function index() @@ -48,7 +49,7 @@ class DashboardController extends Controller $aifSoldInvestmentWatchlist = $this->aifSoldInvestmentWatchlist()['data']; $freSoldInvestmentWatchlist = $this->freSoldInvestmentWatchlist()['data']; $opSoldInvestmentWatchlist = $this->opSoldInvestmentWatchlist()['data']; - + // bought $aifInvestmentListed = $this->aifInvestmentListed()['data']; $freInvestmentListed = $this->freInvestmentListed()['data']; @@ -66,7 +67,7 @@ class DashboardController extends Controller public function getMarketplaceAIFSellerData($api = null) { - try{ + try { $id = auth()->guard('users')->user()->id ?? request()->user()->id; // $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_aif_sellers'])->get(); // foreach ($market_place_data as $row) { @@ -74,28 +75,24 @@ class DashboardController extends Controller // } // return $market_place_data; // $sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get(); - $sellerData = MarketplaceSellerForm::with('aif')->where('users_id',$id)->get(); + $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) - { + if ($api == null) { $data['data'] = $sellerData; - return $data; + return $data; } - if(count($sellerData->toArray())) - { + if (count($sellerData->toArray())) { $market_place_data = $sellerData[0]->aif->toArray(); // dd($market_place_data); return $market_place_data; } return $sellerData; - }catch(\Exception $e) - { - Log::error("Something went wrong while fetching aif sold investment - ". $e->getMessage() . " on ". $e->getLine()); + } catch (\Exception $e) { + Log::error("Something went wrong while fetching aif sold investment - " . $e->getMessage() . " on " . $e->getLine()); // Log::error("Something went wrong while investment-". $e->getMessage() ." " .$e->getLine()); } - } public function aifSoldInvestment() @@ -136,44 +133,38 @@ class DashboardController extends Controller public function getMarketplaceFRESellerData($api = null) { - try{ + try { $id = auth()->guard('users')->user()->id ?? request()->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(); // } // return $market_place_data; - $sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get(); + $sellerData = MarketplaceSellerForm::with('fre')->where('users_id', $id)->get(); // dd($sellerData); - $sellerData->each(function($value){ - $value->fre->each(function($fre){ + $sellerData->each(function ($value) { + $value->fre->each(function ($fre) { // dd($fre); - if($fre) - { - $fre['company_name'] = Company::where('id',$fre->fractional_real_estate_platform)->value('company_name'); + if ($fre) { + $fre['company_name'] = Company::where('id', $fre->fractional_real_estate_platform)->value('company_name'); } - }); // dd($value->fre[0]->fractional_real_estate_platform); }); // dd($sellerData->toArray()); - if($api == null) - { + if ($api == null) { $data['data'] = $sellerData; - return $data; + return $data; } - if(count($sellerData->toArray())) - { + if (count($sellerData->toArray())) { $market_place_data = $sellerData[0]->fre->toArray(); return $market_place_data; } return $sellerData; // if($sellerData->toArray()->count()) - } - catch(\Exception $e) - { + } catch (\Exception $e) { // Log::error('') - Log::error("Something went wrong while fetching fre sold investment -". $e->getMessage() ." " .$e->getLine()); + Log::error("Something went wrong while fetching fre sold investment -" . $e->getMessage() . " " . $e->getLine()); } } @@ -201,7 +192,7 @@ class DashboardController extends Controller public function viewInvestmentDetails() { - try{ + try { $currentInvestmentProduct = $this->view_investors_details('Holding'); $reedemedInvestmentProduct = $this->view_investors_details('Reedemed'); @@ -211,9 +202,8 @@ class DashboardController extends Controller 'reedemedInvestmentProduct' => $reedemedInvestmentProduct, 'totalInvestmentTillDate' => $totalInvestmentTillDate, ]; - }catch(\Exception $e) - { - Log::error("Something went wrong while investment-". $e->getMessage() ." " .$e->getLine()); + } catch (\Exception $e) { + Log::error("Something went wrong while investment-" . $e->getMessage() . " " . $e->getLine()); } } @@ -295,6 +285,7 @@ class DashboardController extends Controller public function view_investors_details($holdingStatus) { + $id = auth()->guard('users')->user()->id ?? request()->user()->id; $user = MonthlyUpdateMaster::where(['users_id' => $id, 'holding_status' => $holdingStatus, 'status' => true]) ->whereIn('categories', ['Alternative Investment Fund', 'Fractional Real Estate']) @@ -388,13 +379,13 @@ class DashboardController extends Controller } $dataArr = [ 'id' => $singleMUM->id, - 'company_logo' => Company::where('id',$singleMUM->investment_platform)->value('company_logo'), + 'company_logo' => Company::where('id', $singleMUM->investment_platform)->value('company_logo'), 'custom_id' => $singleMUM->custom_id, 'categories' => $categories, 'product_category' => $singleMUM->product_category, 'product_name' => $singleMUM->product_name, 'date_of_investment' => $singleMUM->created_at->format('d/m/y'), - 'company_name' => Company::where('id',$singleMUM->investment_platform)->value('company_name'), + 'company_name' => Company::where('id', $singleMUM->investment_platform)->value('company_name'), 'route_id' => \Crypt::encrypt($singleMUM->custom_id) ]; $dataArr['total_investment_amount'] = $amount; @@ -406,22 +397,19 @@ class DashboardController extends Controller { $id = $request->id; // dd($id); - if($id) - { - $product_id = MonthlyUpdateMaster::where('id',$id)->value('products_id'); + if ($id) { + $product_id = MonthlyUpdateMaster::where('id', $id)->value('products_id'); // dd(FractionalRealEstate::where('products_id',$product_id)->exists()); - if(AlternativeInvestmentFund::where('products_id',$product_id)->exists()) - { - $data = Product::with('alternativeInvestmentFund','categorys')->where('id',$product_id)->first(); - return response()->json(['status'=>200,'data'=>$data]); + if (AlternativeInvestmentFund::where('products_id', $product_id)->exists()) { + $data = Product::with('alternativeInvestmentFund', 'categorys')->where('id', $product_id)->first(); + return response()->json(['status' => 200, 'data' => $data]); } - if(FractionalRealEstate::where('products_id',$product_id)->exists()) - { - $data = Product::with('fractional_real_estate','categorys')->where('id',$product_id)->first(); - return response()->json(['status'=>200,'data'=>$data]); + if (FractionalRealEstate::where('products_id', $product_id)->exists()) { + $data = Product::with('fractional_real_estate', 'categorys')->where('id', $product_id)->first(); + return response()->json(['status' => 200, 'data' => $data]); } } - return response()->json(['status'=>404,'message'=>'id is null']); + return response()->json(['status' => 404, 'message' => 'id is null']); } function totalInvestmentAmount_api($singleMUM, $amount) @@ -434,7 +422,7 @@ class DashboardController extends Controller } $dataArr = [ // 'id' => $singleMUM->id, - 'company_logo' => Company::where('id',$singleMUM->investment_platform)->value('company_logo'), + 'company_logo' => Company::where('id', $singleMUM->investment_platform)->value('company_logo'), 'custom_id' => $singleMUM->custom_id, 'categories' => $singleMUM->categories, // 'product_category' => $singleMUM->product_category, @@ -464,8 +452,8 @@ class DashboardController extends Controller $monthlyUpdateMaster = MonthlyUpdateMaster::where('custom_id', $customId)->firstOrFail(); // dd($monthlyUpdateMaster); $data['basic-details'] = $monthlyUpdateMaster; - $data['company_name'] = Company::where('id',$monthlyUpdateMaster->investment_platform)->value('company_name'); - $data['company_logo'] = Company::where('id',$monthlyUpdateMaster->investment_platform)->value('company_logo'); + $data['company_name'] = Company::where('id', $monthlyUpdateMaster->investment_platform)->value('company_name'); + $data['company_logo'] = Company::where('id', $monthlyUpdateMaster->investment_platform)->value('company_logo'); if (MonthlyUpdateAlternativeInvestmentFund::where('custom_id', $customId)->exists()) { $data['category'] = 'Alternative Investment Fund'; $data['data'] = MonthlyUpdateAlternativeInvestmentFund::where(['custom_id' => $customId, 'status' => true])->latest()->first(); @@ -495,7 +483,7 @@ class DashboardController extends Controller if ($activeSeller) { abort(404); } - $products_id = null ; + $products_id = null; if ($custom_id) { $id = \Crypt::decrypt($custom_id); $data = MonthlyUpdateMaster::with('investor')->where('custom_id', '=', $id)->first(); @@ -512,13 +500,13 @@ class DashboardController extends Controller $data = ''; } - $userKyc = UserKyc::where('users_id',auth()->guard('users')->user()->id)->exists(); + $userKyc = UserKyc::where('users_id', auth()->guard('users')->user()->id)->exists(); $userData = array(); // $user; - $user = ModelsUser::where('id',auth()->guard('users')->user()->id)->first(); + $user = ModelsUser::where('id', auth()->guard('users')->user()->id)->first(); $marketPlaceSellerForm = MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->first(); // if ($userKyc) { - // dd($marketPlaceSellerForm); + // dd($marketPlaceSellerForm); // } $userData = (object)[ 'encrypted_custom_id' => $custom_id, @@ -574,7 +562,7 @@ class DashboardController extends Controller 'contact_number' => $request->contact_number, 'email' => $request->email, ]; - session::put('sellerFormData', $data); + session::put('sellerFormData', $data); if (session::has('sellerFormData')) { return response()->json(['status' => 200, 'message' => 'Seller Form Reviewed & Submitted!']); } @@ -595,7 +583,7 @@ class DashboardController extends Controller } - $aifProduct = (object)[ + $aifProduct = (object)[ // 'encrypted_custom_id' => $custom_id, 'name_of_the_aif_fund' => $monthlyUpdateMaster->product_name ?? null, 'fund_category' => $monthlyUpdateMaster->fund_category ?? null, @@ -693,8 +681,8 @@ class DashboardController extends Controller } // dd(session::get('sellerFormData')); $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ - 'users_id' => auth()->guard('users')->user()->id - ],session::get('sellerFormData')); + 'users_id' => auth()->guard('users')->user()->id + ], session::get('sellerFormData')); // dd($sellerFormUpdateCreate); $aifSellerForm = MarketplaceAlternativeInvestmentFundSeller::create([ 'seller_forms_id' => MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->value('id'), @@ -755,7 +743,7 @@ class DashboardController extends Controller } $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ 'users_id' => auth()->guard('users')->user()->id - ],session::get('sellerFormData')); + ], session::get('sellerFormData')); $freSellerForm = MarketplaceFractionalRealEstateSeller::create([ 'seller_forms_id' => MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->value('id'), @@ -849,68 +837,65 @@ class DashboardController extends Controller public function aifInvestmentWatchlist() { - try{ + try { $data['data'] = MarketplaceBuyerForm::query() - ->join('marketplace_aif_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_aif_sellers.id') - ->alernativeInvestmentFund() - ->where('listing_status', '!=', 'Hide') - ->notSold() - // ->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment') - ->select( - 'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers - 'marketplace_aif_sellers.name_of_the_aif_fund', - 'marketplace_aif_sellers.slug', - 'marketplace_aif_sellers.fund_category', - 'marketplace_aif_sellers.fund_strategy', - 'marketplace_aif_sellers.type_of_fund', - 'marketplace_aif_sellers.total_capital_commitment', - 'marketplace_aif_sellers.uncalled_capital_commitment' + ->join('marketplace_aif_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_aif_sellers.id') + ->alernativeInvestmentFund() + ->where('listing_status', '!=', 'Hide') + ->notSold() + // ->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment') + ->select( + 'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers + 'marketplace_aif_sellers.name_of_the_aif_fund', + 'marketplace_aif_sellers.slug', + 'marketplace_aif_sellers.fund_category', + 'marketplace_aif_sellers.fund_strategy', + 'marketplace_aif_sellers.type_of_fund', + 'marketplace_aif_sellers.total_capital_commitment', + 'marketplace_aif_sellers.uncalled_capital_commitment' ) ->get(); - // $data['data'] = MarketplaceBuyerForm::has('aifSellerData')->with('aifSellerData')->alernativeInvestmentFund()->notSold()->get(); - // dd($data['data']->toArray()); - return $data; - } - catch(\Exception $e) - { - Log::error("Something went wrong while fetching fre watchlist-". $e->getMessage() ." " .$e->getLine()); + // $data['data'] = MarketplaceBuyerForm::has('aifSellerData')->with('aifSellerData')->alernativeInvestmentFund()->notSold()->get(); + // dd($data['data']->toArray()); + Log::info("Data Fetch Sucesfully"); + + return $data; + } catch (\Exception $e) { + Log::error("Something went wrong while fetching fre watchlist-" . $e->getMessage() . " " . $e->getLine()); } } public function freInvestmentWatchlist() { - try{ + try { $data['data'] = MarketplaceBuyerForm::query() - // ->leftJoin('compaines', 'marketplace_fre_sellers.fractional_real_estate_platform', 'compaines.id') - ->join('marketplace_fre_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_fre_sellers.id') - // ->with('compaines') - ->fractionalRealEstate() - ->where('listing_status', '!=', 'Hide') - ->notSold() - // ->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price') - ->select( - 'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers - 'marketplace_fre_sellers.property_name', - 'marketplace_fre_sellers.slug', - 'marketplace_fre_sellers.property_address', - 'marketplace_fre_sellers.property_grade', - 'marketplace_fre_sellers.asset_type', - 'marketplace_fre_sellers.fractional_real_estate_platform', - 'marketplace_fre_sellers.expected_selling_price' + // ->leftJoin('compaines', 'marketplace_fre_sellers.fractional_real_estate_platform', 'compaines.id') + ->join('marketplace_fre_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_fre_sellers.id') + // ->with('compaines') + ->fractionalRealEstate() + ->where('listing_status', '!=', 'Hide') + ->notSold() + // ->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price') + ->select( + 'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers + 'marketplace_fre_sellers.property_name', + 'marketplace_fre_sellers.slug', + 'marketplace_fre_sellers.property_address', + 'marketplace_fre_sellers.property_grade', + 'marketplace_fre_sellers.asset_type', + 'marketplace_fre_sellers.fractional_real_estate_platform', + 'marketplace_fre_sellers.expected_selling_price' ) - ->get(); - $data['data']->each(function($value){ - if($value->fractional_real_estate_platform != null) - { - $value->company_name = Company::where('id',$value->fractional_real_estate_platform)->value('company_name'); + ->get(); + $data['data']->each(function ($value) { + if ($value->fractional_real_estate_platform != null) { + $value->company_name = Company::where('id', $value->fractional_real_estate_platform)->value('company_name'); } }); return $data; - } - catch(\Exception $e) - { - Log::error("Something went wrong while fetching fre watchlist-". $e->getMessage() ." " .$e->getLine()); + } catch (\Exception $e) { + Log::error("Something went wrong while fetching fre watchlist-" . $e->getMessage() . " " . $e->getLine()); } } @@ -935,7 +920,7 @@ class DashboardController extends Controller // ->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(); - // dd($data); + // dd($data); return $data; } @@ -949,10 +934,9 @@ class DashboardController extends Controller // ->where('marketplace_fre_sellers.listing_status', 'Hide') ->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price') ->get(); - $data['data']->each(function($value){ - if($value->fractional_real_estate_platform != null) - { - $value->company_name = Company::where('id',$value->fractional_real_estate_platform)->value('company_name'); + $data['data']->each(function ($value) { + if ($value->fractional_real_estate_platform != null) { + $value->company_name = Company::where('id', $value->fractional_real_estate_platform)->value('company_name'); } }); return $data; @@ -967,7 +951,7 @@ class DashboardController extends Controller ->where('listing_status', '!=', 'Hide') ->select('product_category', 'security_name', 'instrument_type', 'instrument_issuer', 'credit_rating', 'expected_sale_price_per_unit') ->get(); - // dd($data); + // dd($data); return $data; } @@ -980,13 +964,13 @@ class DashboardController extends Controller // ->where('marketplace_aif_sellers.status', 'Approved') ->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment') ->get(); - // dd($data); - return $data; - } - - public function freInvestmentListed() - { - $data['data'] = MarketplaceSellerForm::query() + // dd($data); + return $data; + } + + public function freInvestmentListed() + { + $data['data'] = MarketplaceSellerForm::query() ->where('marketplace_seller_forms.users_id', auth()->guard('users')->user()->id) ->join('marketplace_fre_sellers', 'marketplace_seller_forms.id', 'marketplace_fre_sellers.seller_forms_id') ->where('marketplace_fre_sellers.listing_status', '!=', 'Hide') @@ -1090,8 +1074,8 @@ class DashboardController extends Controller // ]; // session::put('sellerFormData', $data); // if (session::has('sellerFormData')) { - return response()->json(['status' => 200, 'message' => 'Seller Form Reviewed & Submitted!']); - // return response()->json(['status' => 200, 'message' => 'Thank you for submitting the seller form. Our team will promptly review your submission and keep you informed regarding the status of your product listing.']); + return response()->json(['status' => 200, 'message' => 'Seller Form Reviewed & Submitted!']); + // return response()->json(['status' => 200, 'message' => 'Thank you for submitting the seller form. Our team will promptly review your submission and keep you informed regarding the status of your product listing.']); // } // return response()->json(['status' => 400, 'message' => 'Seller Form Could Not Be Reviewed & Submitted!']); } @@ -1115,7 +1099,7 @@ class DashboardController extends Controller 'no_of_units_held' => 'required', 'no_of_units_you_wish_to_sell' => 'required', 'expected_sale_per_unit' => 'required', - 'latest_valuation_date'=>'required', + 'latest_valuation_date' => 'required', 'name' => 'required', 'city' => 'required', 'country' => 'required', @@ -1138,13 +1122,13 @@ class DashboardController extends Controller // } $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ 'users_id' => $request->user()->id - ],[ - 'name'=>$request->name, - 'city'=>$request->city, - 'country'=>$request->country, - 'postal_code'=>$request->postal_code, - 'contact_number'=>$request->contact_number, - 'email'=>$request->email, + ], [ + 'name' => $request->name, + 'city' => $request->city, + 'country' => $request->country, + 'postal_code' => $request->postal_code, + 'contact_number' => $request->contact_number, + 'email' => $request->email, ]); $aifSellerForm = MarketplaceAlternativeInvestmentFundSeller::create([ @@ -1194,7 +1178,7 @@ class DashboardController extends Controller 'original_amount_invested' => 'required', 'current_market_value_of_the_property' => 'required', 'expected_selling_price' => 'required', - 'latest_valuation_date'=>'required', + 'latest_valuation_date' => 'required', 'name' => 'required', 'city' => 'required', 'country' => 'required', @@ -1217,13 +1201,13 @@ class DashboardController extends Controller $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ 'users_id' => $request->user()->id - ],[ - 'name'=>$request->name, - 'city'=>$request->city, - 'country'=>$request->country, - 'postal_code'=>$request->postal_code, - 'contact_number'=>$request->contact_number, - 'email'=>$request->email, + ], [ + 'name' => $request->name, + 'city' => $request->city, + 'country' => $request->country, + 'postal_code' => $request->postal_code, + 'contact_number' => $request->contact_number, + 'email' => $request->email, ]); // dd($request->all(),$request->user()->id,request()->user()->id); @@ -1246,7 +1230,7 @@ class DashboardController extends Controller 'listing_status' => 'Hide', 'status' => 'Pending', 'latest_valuation_date' => $request->latest_valuation_date, //latest_valuation_date added by hritik on 09-04-24 - + ]); if ($freSellerForm) { $user = User::find($request->user()->id); diff --git a/config/logging.php b/config/logging.php index 6aa77fe..6e5ecc0 100644 --- a/config/logging.php +++ b/config/logging.php @@ -3,6 +3,7 @@ use Monolog\Handler\NullHandler; use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; +use Monolog\Processor\PsrLogMessageProcessor; return [ @@ -19,6 +20,22 @@ return [ 'default' => env('LOG_CHANNEL', 'stack'), + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], + /* |-------------------------------------------------------------------------- | Log Channels @@ -37,7 +54,7 @@ return [ 'channels' => [ 'stack' => [ 'driver' => 'stack', - 'channels' => ['single'], + 'channels' => ['single', 'daily'], 'ignore_exceptions' => false, ], @@ -45,13 +62,15 @@ return [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, ], 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), 'level' => env('LOG_LEVEL', 'debug'), - 'days' => 14, + 'days' => 30, + 'replace_placeholders' => true, ], 'slack' => [ @@ -60,35 +79,43 @@ return [ 'username' => 'Laravel Log', 'emoji' => ':boom:', 'level' => env('LOG_LEVEL', 'critical'), + 'replace_placeholders' => true, ], 'papertrail' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => SyslogUdpHandler::class, + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), ], + 'processors' => [PsrLogMessageProcessor::class], ], 'stderr' => [ 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), 'handler' => StreamHandler::class, 'formatter' => env('LOG_STDERR_FORMATTER'), 'with' => [ 'stream' => 'php://stderr', ], + 'processors' => [PsrLogMessageProcessor::class], ], 'syslog' => [ 'driver' => 'syslog', 'level' => env('LOG_LEVEL', 'debug'), + 'facility' => LOG_USER, + 'replace_placeholders' => true, ], 'errorlog' => [ 'driver' => 'errorlog', 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, ], 'null' => [ @@ -102,3 +129,4 @@ return [ ], ]; + From 2e3b126e56768d0e6b80eb0f436b61876360699d Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 14:37:19 +0530 Subject: [PATCH 07/12] RouteServiceProvider file updated --- app/Providers/RouteServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 3bd3c81..7522f16 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -57,7 +57,7 @@ class RouteServiceProvider extends ServiceProvider protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(120)->by(optional($request->user())->id ?: $request->ip()); }); } } From 1c35872da5a2f7896af7eac277112b2c417fb1eb Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 15:26:59 +0530 Subject: [PATCH 08/12] fixing file download issue --- .../Controllers/Frontend/DashboardController.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index 3866a5b..ec78b81 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -474,7 +474,15 @@ class DashboardController extends Controller public function getStatementReportAPI($file_name) { - return \Storage::download('files/monthly-update/' . $file_name); + // dd($file_name); + $file = 'files/monthly-update/'.$file_name; + if(\Storage::exists($file)) + { + return \Storage::download($file); + } + // return \Storage::download('files/monthly-update/' . $file_name); + return 'File not found'; + // return \Storage::download('files/monthly-update/' . $file_name); } public function viewDetailMarketPlace(Request $request, $custom_id = null) @@ -1097,7 +1105,7 @@ class DashboardController extends Controller // 'tenure_from_final_close' => 'required', 'current_or_latest_nav' => 'required', 'no_of_units_held' => 'required', - 'no_of_units_you_wish_to_sell' => 'required', + // 'no_of_units_you_wish_to_sell' => 'required', 'expected_sale_per_unit' => 'required', 'latest_valuation_date' => 'required', 'name' => 'required', @@ -1148,8 +1156,8 @@ class DashboardController extends Controller 'tenure_from_final_close' => $request->tenure_from_final_close ?? null, 'current_or_latest_nav' => $request->current_or_latest_nav, 'no_of_units_held' => $request->no_of_units_held, - 'no_of_units_you_wish_to_sell' => $request->no_of_units_you_wish_to_sell, - 'og_no_of_units_wish_to_sell' => $request->no_of_units_you_wish_to_sell, + 'no_of_units_you_wish_to_sell' => $request->no_of_units_you_wish_to_sell ?? 0, + 'og_no_of_units_wish_to_sell' => $request->no_of_units_you_wish_to_sell ?? 0, 'expected_sale_per_unit' => $request->expected_sale_per_unit, 'listing_status' => 'Hide', 'status' => 'Pending', From 823d2120d10825492dfc7a9adc78391a59889dcd Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 16:25:51 +0530 Subject: [PATCH 09/12] fixing aif seller form category issue --- .../pre_owned_investment/pending_investment_view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/Admin/Pages/pre_owned_investment/pending_investment_view.blade.php b/resources/views/Admin/Pages/pre_owned_investment/pending_investment_view.blade.php index a6c7a9c..063268b 100644 --- a/resources/views/Admin/Pages/pre_owned_investment/pending_investment_view.blade.php +++ b/resources/views/Admin/Pages/pre_owned_investment/pending_investment_view.blade.php @@ -54,7 +54,7 @@
- +
From efffe113a8d10609bbc14f6b2711a3e9088370ae Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 16:28:11 +0530 Subject: [PATCH 10/12] fixing aif seller form category issue --- .../profile/market-list/alternative-investment-fund.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php b/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php index a7b102d..f5c34df 100644 --- a/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php +++ b/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php @@ -213,7 +213,7 @@ if (value == 'Category III') { $('#type_of_fund').html(''); $('#type_of_fund').html( - "" + "" ); } }) From 457f0119e5e258dff054db7788a37d5dbe345028 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 17:59:39 +0530 Subject: [PATCH 11/12] fixing image download issue --- app/Models/MonthlyUpdateAlternativeInvestmentFund.php | 2 +- app/Models/MonthlyUpdateFractionalRealEstate.php | 2 +- app/Providers/RouteServiceProvider.php | 2 +- public/assets/css/FrontendCss/style.css | 6 ++++++ routes/web.php | 3 +++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/Models/MonthlyUpdateAlternativeInvestmentFund.php b/app/Models/MonthlyUpdateAlternativeInvestmentFund.php index 6a05592..959adb2 100644 --- a/app/Models/MonthlyUpdateAlternativeInvestmentFund.php +++ b/app/Models/MonthlyUpdateAlternativeInvestmentFund.php @@ -19,7 +19,7 @@ class MonthlyUpdateAlternativeInvestmentFund extends Model $arr = []; if($value){ foreach(json_decode($value) as $data){ - $val = imagePath('api/get-statement-report/') . $data; + $val = imagePath('get-statement-report/') . $data; // $val = 'api/get-statement-report/' . $data; array_push($arr,$val); } diff --git a/app/Models/MonthlyUpdateFractionalRealEstate.php b/app/Models/MonthlyUpdateFractionalRealEstate.php index e89e6b9..12f328e 100644 --- a/app/Models/MonthlyUpdateFractionalRealEstate.php +++ b/app/Models/MonthlyUpdateFractionalRealEstate.php @@ -18,7 +18,7 @@ class MonthlyUpdateFractionalRealEstate extends Model if($value){ $arr = []; foreach(json_decode($value) as $data){ - $val = imagePath('api/get-statement-report/') . $data; + $val = imagePath('get-statement-report/') . $data; array_push($arr,$val); } return $arr ; diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 7522f16..de8a298 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -57,7 +57,7 @@ class RouteServiceProvider extends ServiceProvider protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(120)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(500)->by(optional($request->user())->id ?: $request->ip()); }); } } diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index f992b17..1d4388c 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -6559,3 +6559,9 @@ button#modal_close span { .admin-profile .dropdown .dropdown-menu { max-height: 500px !important; } +.Secondary .table p { + text-align: center !important; + font-size: 14px; + font-style: normal; + margin-top: 15px; +} \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 856e6b6..67d323a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -462,6 +462,9 @@ Route::get('new-mail-template',function(){ return view('Admin.email.new-mail-template'); }); + +Route::get("get-statement-report/{file_name}", [FrontendDashboardController::class, 'getStatementReportAPI'])->name('get-statement-report-api'); + //User Routes Route::middleware([FrontendAccess::class])->group(function () { Route::get("market-list/{custom_id?}", [FrontendDashboardController::class, 'viewDetailMarketPlace'])->name('market-list'); From 966eed1765c6f11ef73f7c38870adc531c7d7a26 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Fri, 21 Jun 2024 18:55:44 +0530 Subject: [PATCH 12/12] fixing image download issue --- app/Models/MonthlyUpdateAlternativeInvestmentFund.php | 2 +- app/Models/MonthlyUpdateFractionalRealEstate.php | 3 ++- .../investment-details/alternative-investment-fund.blade.php | 4 ++-- .../investment-details/fractional-real-estate.blade.php | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Models/MonthlyUpdateAlternativeInvestmentFund.php b/app/Models/MonthlyUpdateAlternativeInvestmentFund.php index 959adb2..8950257 100644 --- a/app/Models/MonthlyUpdateAlternativeInvestmentFund.php +++ b/app/Models/MonthlyUpdateAlternativeInvestmentFund.php @@ -19,7 +19,7 @@ class MonthlyUpdateAlternativeInvestmentFund extends Model $arr = []; if($value){ foreach(json_decode($value) as $data){ - $val = imagePath('get-statement-report/') . $data; + $val = imagePath('storage/app/files/monthly-update/') . $data; // $val = 'api/get-statement-report/' . $data; array_push($arr,$val); } diff --git a/app/Models/MonthlyUpdateFractionalRealEstate.php b/app/Models/MonthlyUpdateFractionalRealEstate.php index 12f328e..156c1e7 100644 --- a/app/Models/MonthlyUpdateFractionalRealEstate.php +++ b/app/Models/MonthlyUpdateFractionalRealEstate.php @@ -18,7 +18,8 @@ class MonthlyUpdateFractionalRealEstate extends Model if($value){ $arr = []; foreach(json_decode($value) as $data){ - $val = imagePath('get-statement-report/') . $data; + // $val = imagePath('get-statement-report/') . $data; + $val = imagePath('storage/app/files/monthly-update/') . $data; array_push($arr,$val); } return $arr ; diff --git a/resources/views/Frontend/Pages/profile/investment-details/alternative-investment-fund.blade.php b/resources/views/Frontend/Pages/profile/investment-details/alternative-investment-fund.blade.php index 045bd6d..2753073 100644 --- a/resources/views/Frontend/Pages/profile/investment-details/alternative-investment-fund.blade.php +++ b/resources/views/Frontend/Pages/profile/investment-details/alternative-investment-fund.blade.php @@ -166,8 +166,8 @@ Statement/Reports @if($data['data']['statement_reports']) - @foreach($data['data']['statement_reports'] as $data) - Statement/Reports {{$loop->iteration}} + @foreach(json_decode($data['data']->getRawOriginal()['statement_reports']) as $data) + Statement/Reports {{$loop->iteration}} @endforeach @else N/A diff --git a/resources/views/Frontend/Pages/profile/investment-details/fractional-real-estate.blade.php b/resources/views/Frontend/Pages/profile/investment-details/fractional-real-estate.blade.php index a1290f4..766801d 100644 --- a/resources/views/Frontend/Pages/profile/investment-details/fractional-real-estate.blade.php +++ b/resources/views/Frontend/Pages/profile/investment-details/fractional-real-estate.blade.php @@ -140,9 +140,10 @@ Statement/Reports + {{-- @dd(json_decode($data['data']->getRawOriginal()['statement_reports'])) --}} @if($data['data']['statement_reports']) - @foreach($data['data']['statement_reports'] as $data) - Statement/Reports {{$loop->iteration}} + @foreach(json_decode($data['data']->getRawOriginal()['statement_reports']) as $data) + Statement/Reports {{$loop->iteration}} @endforeach @else N/A