From 76ab93c09c8b5f7250670d6b26ab9f6efffe2a15 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Wed, 12 Jun 2024 13:03:22 +0530 Subject: [PATCH] added middleware to product view page --- .../Admin/ManageFreeUInvestmentController.php | 1 + .../Admin/ManageInvestorController.php | 3 +- .../AlternativeInvestmentFundController.php | 23 +-- .../FractionalRealEstateController.php | 18 ++- app/Http/Kernel.php | 1 + .../Middleware/cannotAccessWithoutLoggin.php | 26 ++++ app/Http/Resources/LongOnlyEquityResource.php | 8 + app/Imports/FundImport.php | 2 +- app/Models/Fund.php | 2 +- .../edit-product/real-estate.blade.php | 21 +++ .../long-only-equity-fund-product.blade.php | 4 +- .../fractional-real-estate/product.blade.php | 110 -------------- .../indian-real-estate/product.blade.php | 140 +++++++++--------- routes/web.php | 34 ++--- 14 files changed, 172 insertions(+), 221 deletions(-) create mode 100644 app/Http/Middleware/cannotAccessWithoutLoggin.php diff --git a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php index 2bd9ce9..5685504 100644 --- a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php +++ b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php @@ -885,6 +885,7 @@ class ManageFreeUInvestmentController extends Controller 'facilities_features' => $request->facilities_features, 'construction_age' => $request->construction_age, 'country' => $request->country, + 'location' => $request->location, 'remarks' => $request->remarks, ]); diff --git a/app/Http/Controllers/Admin/ManageInvestorController.php b/app/Http/Controllers/Admin/ManageInvestorController.php index d04a0bc..23ff9ff 100644 --- a/app/Http/Controllers/Admin/ManageInvestorController.php +++ b/app/Http/Controllers/Admin/ManageInvestorController.php @@ -122,6 +122,7 @@ class ManageInvestorController extends Controller public function view_investors_details($id) { $currentInvestment = $this->getUserProducts('Holding', $id); + // dd($currentInvestment); $reedemedInvestment = $this->getUserProducts('Reedemed', $id); $totalInvestmentForHolding = array_sum(array_column($currentInvestment['productsDetails'], 'total_investment_amount')); @@ -149,7 +150,7 @@ class ManageInvestorController extends Controller 'categories' => $singleMUM->categories, 'product_category' => $singleMUM->product_category, 'product_name' => $singleMUM->product_name, - 'platform' => Company::find($singleMUM->investment_platform)->value('company_name') + 'platform' => Company::where('id',$singleMUM->investment_platform)->value('company_name') ]; if (MonthlyUpdateAlternativeInvestmentFund::where('custom_id', $singleMUM->custom_id)->exists()) { $data = MonthlyUpdateAlternativeInvestmentFund::where('custom_id', $singleMUM->custom_id)->latest()->first(); diff --git a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php index ee6383f..b00fb36 100644 --- a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php +++ b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php @@ -565,18 +565,19 @@ class AlternativeInvestmentFundController extends Controller public function longOnlyEquityFundProduct($slug) { $longOnlyEquityFund = $this->longOnlyEquityFundData($slug)->getData()->data; - $otherHF = AlternativeInvestmentFund::query() - ->join('products', 'alternative_investment_funds.products_id', 'products.id') - ->where(['status' => true, 'categories_id' => 40]) - // ->where('status',false) - ->where('slug', '!=', $slug) - // ->where('categories_id',26) - ->get(); - $productData = AlternativeInvestmentFund::where('slug', '=', $slug)->first(); - $product = Product::with('product_images')->where('id', '=', $productData->products_id)->first(); + // dd($longOnlyEquityFund); + // $otherHF = AlternativeInvestmentFund::query() + // ->join('products', 'alternative_investment_funds.products_id', 'products.id') + // ->where(['status' => true, 'categories_id' => 40]) + // // ->where('status',false) + // ->where('slug', '!=', $slug) + // // ->where('categories_id',26) + // ->get(); + // $productData = AlternativeInvestmentFund::where('slug', '=', $slug)->first(); + $productData = Product::with('product_images')->where('id', '=', $longOnlyEquityFund->products_id)->first(); // dd($otherHF); - // dd($longOnlyEquityFund, $slug); - return view('Frontend.Pages.alternative-investment-fund.long-only-equity-fund-product', compact('longOnlyEquityFund', 'otherHF', 'productData', 'product')); + // dd($productData); + return view('Frontend.Pages.alternative-investment-fund.long-only-equity-fund-product', compact('longOnlyEquityFund', 'productData')); } public function privateCreditFund() { diff --git a/app/Http/Controllers/Frontend/FractionalRealEstateController.php b/app/Http/Controllers/Frontend/FractionalRealEstateController.php index 01c62e3..864993b 100644 --- a/app/Http/Controllers/Frontend/FractionalRealEstateController.php +++ b/app/Http/Controllers/Frontend/FractionalRealEstateController.php @@ -28,14 +28,16 @@ class FractionalRealEstateController extends Controller public function product($slug) { $fractionalRealEstate = $this->fractionalRealEstateData($slug)->getData()->data; - $otherFRE = FractionalRealEstate::query() - ->join('products', 'fractional_real_estates.products_id', 'products.id') - ->where(['status' => true, 'categories_id' => 2]) - ->where('slug', '!=', $slug) - ->get(); - $productData = FractionalRealEstate::where('slug', '=', $slug)->first(); - $productData = Product::with('product_images')->where('id', $productData->products_id)->first(); - return view('Frontend.Pages.fractional-real-estate.product', compact('fractionalRealEstate', 'otherFRE', 'productData')); + // dd($fractionalRealEstate->products_id); + // $otherFRE = FractionalRealEstate::query() + // ->join('products', 'fractional_real_estates.products_id', 'products.id') + // ->where(['status' => true, 'categories_id' => 2]) + // ->where('slug', '!=', $slug) + // ->get(); + // $productData = FractionalRealEstate::where('slug', '=', $slug)->first(); + // dd($productData->toArray(),$fractionalRealEstate); + $productData = Product::with('product_images')->where('id', $fractionalRealEstate->products_id)->first(); + return view('Frontend.Pages.fractional-real-estate.product', compact('fractionalRealEstate', 'productData')); } public function downloadFilePersantation($filename) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 0af3047..8360f1a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -75,5 +75,6 @@ class Kernel extends HttpKernel 'FrontendAccess' => \App\Http\Middleware\FrontendAccess::class, 'AlreadyLoggedIn' => \App\Http\Middleware\AlreadyLoggedIn::class, 'checkLoggedIn' => \App\Http\Middleware\checkLoggedIn::class, + 'cannotAccessWithoutLoggin' => \App\Http\Middleware\cannotAccessWithoutLoggin::class, ]; } diff --git a/app/Http/Middleware/cannotAccessWithoutLoggin.php b/app/Http/Middleware/cannotAccessWithoutLoggin.php new file mode 100644 index 0000000..9337faf --- /dev/null +++ b/app/Http/Middleware/cannotAccessWithoutLoggin.php @@ -0,0 +1,26 @@ +check()) + { + return \Redirect::to('login'); + } + + return $next($request); + } +} diff --git a/app/Http/Resources/LongOnlyEquityResource.php b/app/Http/Resources/LongOnlyEquityResource.php index 52c3241..a8e0f9e 100644 --- a/app/Http/Resources/LongOnlyEquityResource.php +++ b/app/Http/Resources/LongOnlyEquityResource.php @@ -72,6 +72,14 @@ class LongOnlyEquityResource extends JsonResource 'involved_in_short_selling' => $this->involved_in_short_selling, 'minimum_investment' => $this->minimum_investment, 'company' => $this->companies, + 'focused_sectors_industries' => $this->focused_sectors_industries, + 'regions_covered' => $this->regions_covered, + 'isin_code' => $this->isin_code, + 'focused_real_estate_sectors' => $this->focused_real_estate_sectors, + 'rera_complied_property' => $this->rera_complied_property, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, // 'product_images' => ProductImage::where('product_xid',$this->products_id)->get(), ]; } diff --git a/app/Imports/FundImport.php b/app/Imports/FundImport.php index 76a0f48..497ccaa 100644 --- a/app/Imports/FundImport.php +++ b/app/Imports/FundImport.php @@ -112,7 +112,7 @@ class FundImport implements ToCollection, WithHeadingRow 'ytd' => $row['ytd'], 'year1_return' => $row['1_year_return'], 'year3_return' => $row['3_year_return'], - // 'data_as_on' => getConvertedDate($row['data_as_on']) ?? null, + 'data_as_on' => getConvertedDate($row['data_as_on']) ?? null, ]); if ($returns) { foreach ($returns as $key => $value) { diff --git a/app/Models/Fund.php b/app/Models/Fund.php index 7bc621c..f902cfb 100644 --- a/app/Models/Fund.php +++ b/app/Models/Fund.php @@ -10,7 +10,7 @@ class Fund extends Model { use HasFactory, SoftDeletes; - protected $fillable = ['products_id','slug','issuer','fund_name','fund_type','about_issuer','fund_description','sharpe_ratio','annualized_volatility','max_dropdown','isin','inception_date','fund_aum','expense_ratio','nav_per_unit','minimum_investment','ytd','year1_return','year3_return','geographic_focus']; + protected $fillable = ['products_id','slug','issuer','fund_name','fund_type','about_issuer','fund_description','sharpe_ratio','annualized_volatility','max_dropdown','isin','inception_date','fund_aum','expense_ratio','nav_per_unit','minimum_investment','ytd','year1_return','year3_return', 'data_as_on','geographic_focus']; protected $with = ['returns']; diff --git a/resources/views/Admin/Pages/manage_freeu_investment/edit-product/real-estate.blade.php b/resources/views/Admin/Pages/manage_freeu_investment/edit-product/real-estate.blade.php index 150fcd2..05c6512 100644 --- a/resources/views/Admin/Pages/manage_freeu_investment/edit-product/real-estate.blade.php +++ b/resources/views/Admin/Pages/manage_freeu_investment/edit-product/real-estate.blade.php @@ -1102,6 +1102,27 @@ + +
+ + + + + + + + + + + + +
diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php index f3a22b0..e381bc9 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php @@ -97,7 +97,7 @@
- @if ($productData && $productData->product_images) + @if ($productData && $productData->product_images->toArray() != null)
diff --git a/resources/views/Frontend/Pages/fractional-real-estate/product.blade.php b/resources/views/Frontend/Pages/fractional-real-estate/product.blade.php index ea8a0c1..2afe87f 100644 --- a/resources/views/Frontend/Pages/fractional-real-estate/product.blade.php +++ b/resources/views/Frontend/Pages/fractional-real-estate/product.blade.php @@ -260,116 +260,6 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{--
-
-
-
-
-
-
Persentation
- - PDF not available -
-
-
Fact Sheet
- - PDF not available -
-
-
-
-
-
--}} @include('Frontend.Pages.alternative-investment-fund.presentation-factsheet') diff --git a/resources/views/Frontend/Pages/indian-real-estate/product.blade.php b/resources/views/Frontend/Pages/indian-real-estate/product.blade.php index e48e26a..227e7ca 100644 --- a/resources/views/Frontend/Pages/indian-real-estate/product.blade.php +++ b/resources/views/Frontend/Pages/indian-real-estate/product.blade.php @@ -55,19 +55,19 @@ @endif - @if($realEstate->property_location || $realEstate->project_type ||$realEstate->current_status ) + {{-- @if($realEstate->property_location || $realEstate->project_type ||$realEstate->current_status ) --}}
-
+

Property Location

{{ $realEstate->property_location ?? '-' }}
-
+

Project Type

{{ $realEstate->project_type ?? '-' }}
-
+

Current Status

{{ $realEstate->current_status ?? '-' }}
@@ -75,9 +75,9 @@
- @endif + {{-- @endif --}} - @if($productData->description) + {{-- @if($productData->description) --}}
{{--
--}} @@ -89,7 +89,7 @@

Project Type

{{ $realEstate->project_type ?? '-' }}
--}} -
+

Description

{{ $productData->description ?? '-' }}
@@ -97,90 +97,90 @@ {{--
--}}
- @endif + {{-- @endif --}} - @if($realEstate->price_per_sq_ft || $realEstate->booking_amount || $realEstate->price_range || $realEstate->total_price||$realEstate->transaction_type ||$realEstate->project_code_or_rera_id ||$realEstate->area_in_sq_ft ||$realEstate->construction_status ||$realEstate->launch_date ||$realEstate->geographic_focus ||$realEstate->built_up_area ||$realEstate->carpet_area) + {{-- @if($realEstate->price_per_sq_ft || $realEstate->booking_amount || $realEstate->price_range || $realEstate->total_price||$realEstate->transaction_type ||$realEstate->project_code_or_rera_id ||$realEstate->area_in_sq_ft ||$realEstate->construction_status ||$realEstate->launch_date ||$realEstate->geographic_focus ||$realEstate->built_up_area ||$realEstate->carpet_area) --}}
-
+

Price Per Sq Ft

{{ $realEstate->price_per_sq_ft ?? '-' }}
-
+

Booking Amount

{{ $realEstate->booking_amount ?? '-' }}
-
+

Price Range

{{ $realEstate->price_range ?? '-' }}
-
+

Total Price

{{ $realEstate->total_price ?? '-' }}
-
+

Transaction Type

{{ $realEstate->transaction_type ?? '-' }}
-
+

Project Code/Rera Id

{{ $realEstate->project_code_or_rera_id ?? '-' }}
-
+

Area in sq ft

{{ $realEstate->area_in_sq_ft ?? '-' }}
-
+

Construction Status

{{ $realEstate->construction_status ?? '-' }}
-
+

Launch Date

{{ $realEstate->launch_date ?? '-' }}
-
+

Geographic Focus

{{ $realEstate->geographic_focus ?? '-' }}
-
+

Built Up Area

{{ $realEstate->built_up_area ?? '-' }}
{{-- @dd($realEstate->carpet_area); --}} -
+

Carpet area

{{ $realEstate->carpet_area ?? '-' }}
- @endif + {{-- @endif --}}
- @if($realEstate->no_of_bedrooms || $realEstate->no_of_restrooms || $realEstate->no_of_floors || $realEstate->total_towers || $realEstate->builder_details || $realEstate->landmarks || $realEstate->completed_in || $realEstate->total_units || $realEstate->unit_type ) + {{-- @if($realEstate->no_of_bedrooms || $realEstate->no_of_restrooms || $realEstate->no_of_floors || $realEstate->total_towers || $realEstate->builder_details || $realEstate->landmarks || $realEstate->completed_in || $realEstate->total_units || $realEstate->unit_type ) --}}
-
+

No. Of Bedrooms

{{ $realEstate->no_of_bedrooms ?? '-' }}
-
+

No. Of Restrooms

{{ $realEstate->no_of_restrooms ?? '-' }}
-
+

No. Of Floors

{{ $realEstate->no_of_floors ?? '-' }}
- {{--
+ {{--

Slug

{{ $realEstate->slug ?? '-' }}
--}} @@ -188,122 +188,122 @@
-
+

Total Towers

{{ $realEstate->total_towers ?? '-' }}
-
+

Builder Details

{{ $realEstate->builder_details ?? '-' }}
-
+

Landmarks

{{ $realEstate->landmarks ?? '-' }}
-
+

Completed In

{{ $realEstate->completed_in ?? '-' }}
-
+

Total Units

{{ $realEstate->total_units ?? '-' }}
-
+

Unit Type

{{ $realEstate->unit_type ?? '-' }}
- @endif + {{-- @endif --}}
- @if($realEstate->electricity_status || $realEstate->fire_safety_measures || $realEstate->water_facility ) + {{-- @if($realEstate->electricity_status || $realEstate->fire_safety_measures || $realEstate->water_facility ) --}}
-
+

Electricity Status

{{ $realEstate->electricity_status ?? '-' }}
-
+

Fire Satefy Measures

{{ $realEstate->fire_safety_measures ?? '-' }}
-
+

Water Facility

{{ $realEstate->water_facility ?? '-' }}
- @endif - @if($realEstate->furnished_status || $realEstate->commencement_certificate || $realEstate->occupancy_certificate ) + {{-- @endif + @if($realEstate->furnished_status || $realEstate->commencement_certificate || $realEstate->occupancy_certificate ) --}}
-
+

Furnished Status

{{ $realEstate->furnished_status ?? '-' }}
-
+

Commencement Certificate

{{ $realEstate->commencement_certificate ?? '-' }}
-
+

Occupancy Certificate

{{ $realEstate->occupancy_certificate ?? '-' }}
- @endif + {{-- @endif --}}
- @if($realEstate->price_negotiable || $realEstate->maintenance_fees || $realEstate->nearest_railway_metro_station ) + {{-- @if($realEstate->price_negotiable || $realEstate->maintenance_fees || $realEstate->nearest_railway_metro_station ) --}}
-
+

Price Neogtiable

{{ $realEstate->price_negotiable ?? '-' }}
-
+

Maintenance Fees

{{ $realEstate->maintenance_fees ?? '-' }}
-
+

Nearest Railway Metro Station

{{ $realEstate->nearest_railway_metro_station ?? '-' }}
- @endif - @if($realEstate->amenities || $realEstate->car_parking || $realEstate->remarks) + {{-- @endif + @if($realEstate->amenities || $realEstate->car_parking || $realEstate->remarks) --}}
-
+

Amenities

{{ $realEstate->amenities ?? '-' }}
-
+

Car Parking

{{ $realEstate->car_parking ?? '-' }}
-
+

Remarks

{{ $realEstate->remarks ?? '-' }}
- @endif + {{-- @endif --}}
- @if( $realEstate->pre_leased || $realEstate->tenant_details ) + {{-- @if( $realEstate->pre_leased || $realEstate->tenant_details ) --}}
-
+

Pre-Leased

{{ $realEstate->pre_leased ?? '-' }}
-
+

Tenant Details

{{ $realEstate->tenant_details ?? '-' }}
@@ -311,52 +311,52 @@
- @endif + {{-- @endif --}}
- @if($realEstate->facilities_features || $realEstate->total_price ) + {{-- @if($realEstate->facilities_features || $realEstate->total_price ) --}}
-
+

Facilities/Features

{{ $realEstate->facilities_features ?? '-' }}
-
+

Minimum Investment

{{ $realEstate->total_price ?? '-' }}
- @endif + {{-- @endif --}}
- @if($realEstate->construction_age || $realEstate->location ) + {{-- @if($realEstate->construction_age || $realEstate->location ) --}}
-
+

Construction Age

{{ $realEstate->construction_age ?? '-' }}
-
+

Location

{{ $realEstate->location ?? '-' }}
- @endif + {{-- @endif --}}
- @if($realEstate->country || $realEstate->elevators) -
+ {{-- @if($realEstate->country || $realEstate->elevators) --}} +

Country

{{ $realEstate->country ?? '-' }}
-
+

Elevators

{{ $realEstate->elevators ?? '-' }}
- @endif + {{-- @endif --}}
diff --git a/routes/web.php b/routes/web.php index a46780e..6590f51 100644 --- a/routes/web.php +++ b/routes/web.php @@ -981,41 +981,41 @@ Route::controller(AlternativeInvestmentFundController::class)->prefix('alternati Route::get("/category-2", 'aifCategoryTwo')->name('aif-category-2'); Route::get("/category-3", 'aifCategoryThree')->name('aif-category-3'); Route::get("/category-one/venture-capital-fund", 'ventureCapitalFund')->name('venture-capital-fund'); - Route::get("/category-one/venture-capital-fund/{slug}", 'ventureCapitalFundProduct')->name('venture-capital-fund-product'); + Route::get("/category-one/venture-capital-fund/{slug}", 'ventureCapitalFundProduct')->name('venture-capital-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-one/infrastructure-fund", 'infrastructureFund')->name('infrastructure-fund'); - Route::get("/category-one/infrastructure-fund/{slug}", 'infrastructureFundProduct')->name('infrastructure-fund-product'); + Route::get("/category-one/infrastructure-fund/{slug}", 'infrastructureFundProduct')->name('infrastructure-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-one/angel-fund", 'angelFund')->name('angel-fund'); - Route::get("/category-one/angel-fund/{slug}", 'angelFundProduct')->name('angel-fund-product'); + Route::get("/category-one/angel-fund/{slug}", 'angelFundProduct')->name('angel-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-two/private-equity-fund", 'privateEquityFund')->name('private-equity-fund'); - Route::get("/category-two/private-equity-fund/{slug}", 'privateEquityFundProduct')->name('private-equity-fund-product'); + Route::get("/category-two/private-equity-fund/{slug}", 'privateEquityFundProduct')->name('private-equity-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-two/debt-fund", 'debtFund')->name('debt-fund'); - Route::get("/category-two/debt-fund/{slug}", 'debtFundProduct')->name('debt-fund-product'); + Route::get("/category-two/debt-fund/{slug}", 'debtFundProduct')->name('debt-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-two/private-real-asset-fund", 'privateRealEstateFund')->name('private-real-asset-fund'); - Route::get("/category-two/private-real-asset-fund/{slug}", 'privateRealEstateFundProduct')->name('private-real-estate-fund-product'); + Route::get("/category-two/private-real-asset-fund/{slug}", 'privateRealEstateFundProduct')->name('private-real-estate-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-two/fund-for-distressed-asset", 'fundForDistressedAsset')->name('fund-for-distressed-asset'); - Route::get("/category-three/fund-for-distressed-asset/{slug}", 'fundForDistressedAssetProduct')->name('fund-for-distressed-asset-product'); + Route::get("/category-three/fund-for-distressed-asset/{slug}", 'fundForDistressedAssetProduct')->name('fund-for-distressed-asset-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-three/hedge-fund", 'hedgeFund')->name('hedge-fund'); - Route::get("/category-three/hedge-fund/{slug}", 'hedgeFundProduct')->name('hedge-fund-product'); + Route::get("/category-three/hedge-fund/{slug}", 'hedgeFundProduct')->name('hedge-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get("/category-three/private-investment-public-equity", 'privateInvestmentPublicEquity')->name('private-investment-public-equity'); - Route::get("/category-three/private-investment-public-equity/{slug}", 'privateInvestmentPublicEquityProduct')->name('private-investment-public-equity-product'); + Route::get("/category-three/private-investment-public-equity/{slug}", 'privateInvestmentPublicEquityProduct')->name('private-investment-public-equity-product')->middleware(['cannotAccessWithoutLoggin']); Route::get('/category-two/private-credit-funds', 'privateCreditFund')->name('private-credit-funds'); - Route::get('/category-two/private-credit-funds/{slug}', 'privateCreditFundProduct')->name('private-credit-fund-product'); + Route::get('/category-two/private-credit-funds/{slug}', 'privateCreditFundProduct')->name('private-credit-fund-product')->middleware(['cannotAccessWithoutLoggin']); Route::get('/category-three/long-only-equity-funds', 'longOnlyEquityFund')->name('long-only-equity-funds'); // Route::get('/category-three/long-only-equity-funds/', 'longOnlyEquityFund')->name('long-only-equity-funds'); - Route::get("/category-three/long-only-equity-funds/{slug}", 'longOnlyEquityFundProduct')->name('long-only-equity-fund-product'); + Route::get("/category-three/long-only-equity-funds/{slug}", 'longOnlyEquityFundProduct')->name('long-only-equity-fund-product')->middleware(['cannotAccessWithoutLoggin']); }); Route::controller(FractionalRealEstateController::class)->prefix('fractional-real-estate')->name('fractional-real-estate.')->group(function () { Route::get("/", 'index')->name('fre-overview'); - Route::get("/{slug}", 'product')->name('product'); + Route::get("/{slug}", 'product')->name('product')->middleware(['cannotAccessWithoutLoggin']); Route::get("persantaion_file/{filename}", 'downloadFilePersantation')->name('persentationfile'); //shailesh // Route::get("persantaion_file/{filename}",[FractionalRealEstateController::class,'downloadFilePersantation'])->name('persentationfile');//shailesh }); @@ -1091,12 +1091,12 @@ Route::controller(GlobalEquitiesController::class)->prefix('equities')->name('eq Route::controller(GlobalVentureCapitalFund::class)->prefix('venture-capital-funds')->name('venture-capital-funds.')->group(function () { Route::get("/", 'index')->name('overview'); - Route::get("/{slug}", 'product')->name('product'); + Route::get("/{slug}", 'product')->name('product')->middleware(['cannotAccessWithoutLoggin']); }); Route::controller(GlobalPrivateEquityFundController::class)->prefix('private-equity-funds')->name('private-equity-funds.')->group(function () { Route::get("/", 'index')->name('overview'); - Route::get("/{slug}", 'product')->name('product'); + Route::get("/{slug}", 'product')->name('product')->middleware(['cannotAccessWithoutLoggin']); }); Route::controller(GlobalPrivateEquityFundController::class)->prefix('global-private-equity-funds')->name('global-private-equity-funds.')->group(function () { @@ -1106,7 +1106,7 @@ Route::controller(GlobalPrivateEquityFundController::class)->prefix('global-priv Route::controller(GlobalHedgeFundController::class)->prefix('hedge-funds')->name('hedge-funds.')->group(function () { Route::get("/", 'index')->name('overview'); - Route::get("/{slug}", 'product')->name('product'); + Route::get("/{slug}", 'product')->name('product')->middleware(['cannotAccessWithoutLoggin']); }); Route::controller(GlobalExchangeTradedFundsController::class)->prefix('exchange-traded-funds')->name('exchange-traded-funds.')->group(function () { @@ -1126,13 +1126,13 @@ Route::controller(GlobalRealAssetController::class)->prefix('global-real-estate' Route::get("/commercial", 'commercial')->name('commercial'); // Route::get("/{slug}", 'product')->name('product'); }); -Route::get('global-real-estate/{slug}', [IndianRealAssetController::class, 'product'])->name('gre.product'); +Route::get('global-real-estate/{slug}', [IndianRealAssetController::class, 'product'])->name('gre.product')->middleware(['cannotAccessWithoutLoggin']); Route::controller(IndianRealAssetController::class)->prefix('indian-real-estate')->name('ire.')->group(function () { Route::get("/", 'index')->name('overview'); Route::get("/industrial", 'industrial')->name('industrial'); Route::get("/residential", 'residential')->name('residential'); Route::get("/commercial", 'commercial')->name('commercial'); - Route::get("/{slug}", 'product')->name('product'); + Route::get("/{slug}", 'product')->name('product')->middleware(['cannotAccessWithoutLoggin']); }); Route::controller(AccountsController::class)->group(function () {