diff --git a/app/Http/Controllers/Admin/ManageUserProductController.php b/app/Http/Controllers/Admin/ManageUserProductController.php index 0a8fc47..016a708 100644 --- a/app/Http/Controllers/Admin/ManageUserProductController.php +++ b/app/Http/Controllers/Admin/ManageUserProductController.php @@ -130,7 +130,8 @@ class ManageUserProductController extends Controller // $hyfProductNames = $this->getAllProductNames(Category::HighYieldFinanceId); // $sdiProductNames = $this->getAllProductNames(Category::SecuritizedDebtInstrumentId); // $idProductNames = $this->getAllProductNames(Category::InvoiceDiscountingId); - $companies = Company::active()->get(); + + // making unique custom id $count = MonthlyUpdateMaster::get()->count(); @@ -144,6 +145,7 @@ class ManageUserProductController extends Controller } $customID .= $count; // dd($customID); + $companies = Company::active()->get(); // return view('Admin.Pages.manage_investors..manage_user_product.manage_user_add', compact('users','aifProductNames','freProductNames','p2pProductNames','ifaProductNames','lbfProductNames','cagaProductNames','vdProductNames','hyfProductNames','sdiProductNames','idProductNames','companies')); return view('Admin.Pages.manage_investors.manage_user_product.manage_user_add', compact('users', 'aifProductNames', 'freProductNames', 'companies','customID')); diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index 06f5ae5..a0be52b 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -33,6 +33,7 @@ class DashboardController extends Controller { $user = $this->getUser()->data; $currentInvestmentProduct = $this->view_investors_details('Holding'); + // dd($currentInvestmentProduct); $reedemedInvestmentProduct = $this->view_investors_details('Reedemed'); // investment on watchlist @@ -363,13 +364,13 @@ class DashboardController extends Controller } $dataArr = [ 'id' => $singleMUM->id, - 'company_logo' => Company::find($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::find($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; @@ -387,7 +388,7 @@ class DashboardController extends Controller } $dataArr = [ // 'id' => $singleMUM->id, - 'company_logo' => Company::find($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, @@ -405,6 +406,7 @@ class DashboardController extends Controller { // $customId = Crypt::decrypt($customId); $data = $this->getInvestmentDetails($customId); + // dd($data); return view('Frontend.Pages.profile.investment-details.index', compact('data')); } @@ -413,9 +415,10 @@ class DashboardController extends Controller $data = array(); $customId = Crypt::decrypt($customId); $monthlyUpdateMaster = MonthlyUpdateMaster::where('custom_id', $customId)->firstOrFail(); + // dd($monthlyUpdateMaster); $data['basic-details'] = $monthlyUpdateMaster; - $data['company_name'] = Company::find($monthlyUpdateMaster->investment_platform)->value('company_name'); - $data['company_logo'] = Company::find($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(); diff --git a/app/helper.php b/app/helper.php index 6d73000..c51d7ea 100644 --- a/app/helper.php +++ b/app/helper.php @@ -51,7 +51,7 @@ function imagePath($path = null) $finalPath = "https://staging.jerichoalternatives.in/"; } if (env('APP_ENV') == 'local') { - $finalPath = "http://localhost/freeu/my-freeu/"; + $finalPath = "http://localhost/my-freeu/"; } return $finalPath . $path; }