Posts

Katik Dependent Dropdown

Image
Category Model public static function getCategories() {     return Self::find()->select(['name', 'id'])->indexBy('id')->column(); } Sub Category Model public static function getSubCatList($categoryID, $ isAjax = false) {     $subCategory = self::find()         ->where(['category_id' => $categoryID]);     if ($isAjax == true) {         return $subCategory->select(['id', 'name'])->asArray()->all();     } else {         return $subCategory->select(['name'])->indexBy('id')->column();     } } Product model public static function getProductList($categoryID, $subCatID, $ isAjax = false) {     $product = self::find()         ->where(['category_id' => $categoryID])         ->andWhere(['sub_category_id' => $subCatID]);     if ($isAjax) {         return $product->select(['id', 'name'])->asArray()->all();     } els

Install Yii2 Extension Manually

Image

Create sub Module using Yii2 Gii

Image