|
@@ -36,16 +36,19 @@ if ($host == 'internal-demo-site.mietubl.com.cn') {
|
|
|
->first();
|
|
|
|
|
|
if ($categoryId) {
|
|
|
- return ProductController::category($slug);
|
|
|
+ $productController = new ProductController();
|
|
|
+ return $productController->category($slug);
|
|
|
} else {
|
|
|
$page = SitePage::where('status', '1')->where('dist_id', getDistId())->where('slug', $slug)->first();
|
|
|
if ($page) {
|
|
|
- return PageController::detail($page);
|
|
|
+ $pageController = new PageController();
|
|
|
+ return $pageController->detail($page);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
Route::get('/produto/{slug}', function ($slug) {
|
|
|
- return ProductController::detail($slug);
|
|
|
+ $productController = new ProductController();
|
|
|
+ return $productController->detail($slug);
|
|
|
});
|
|
|
}
|
|
|
|