Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Есть ли у категории продукты
- * @return bool
- */
- public function haveProducts()
- {
- return (bool)CatalogProduct::find()
- ->where([
- 'catalog_category_id' => $this->id
- ])
- ->count('id');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement