diff --git a/components/CategoryModel.php b/components/CategoryModel.php index bd24d58..8993ec3 100644 --- a/components/CategoryModel.php +++ b/components/CategoryModel.php @@ -111,7 +111,7 @@ public static function cats() */ public static function generateTree() { - $collection = self::find()->with('seo')->sort()->asArray()->all(); + $collection = static::find()->with('seo')->sort()->asArray()->all(); $trees = array(); $l = 0; @@ -159,7 +159,7 @@ public static function generateTree() */ public static function generateFlat() { - $collection = self::find()->with('seo')->sort()->asArray()->all(); + $collection = static::find()->with('seo')->sort()->asArray()->all(); $flat = []; if (count($collection) > 0) {