Debugbar::startMeasure('nav_catalog_models', 'Request catalog models');
Debugbar::startMeasure('nav_catalog_models_types', 'Request catalog models (types)');
- $productTypes = ProductType::all();
+ $productTypes = ProductType::whereVariant($menu->getVariant())->all();
Debugbar::stopMeasure('nav_catalog_models_types');
Debugbar::startMeasure('nav_catalog_models_products', 'Request catalog models (products)');
- $products = Product::all();
+ $products = Product::whereVariant($menu->getVariant())->all();
Debugbar::stopMeasure('nav_catalog_models_products');
Debugbar::stopMeasure('nav_catalog_models');
Debugbar::startMeasure('nav_news', 'Make news nav items');
parent::setMenuChildren($menu);
- $news = NewsModel::all();
+ $news = NewsModel::whereVariant()->all();
foreach ($news as $newsItem) {
Debugbar::startMeasure('nav_applications', 'Make applications nav items');
parent::setMenuChildren($menu);
- $applications = Application::all();
+ $applications = Application::whereVariant($menu->getVariant())->all();
$solution_apps = $menu->getPageData()->get('applications');
if (null === $solution_apps || !$solution_apps) {