protected function loadCategory() { if (!($categoryId = $this->property('categoryFilter'))) { return null; } if (!($category = ProductsCategory::whereSlug($categoryId)->first())) { return null; } return $category; }