public function down()
 {
     $this->dropTable(CategoryToItem::tableName());
     $this->dropTable(Category::tableName());
 }
 public function down()
 {
     $this->delete(Category::tableName(), $this->item);
 }
コード例 #3
0
 /**
  * @return array
  */
 public function categoriesList()
 {
     $class = Category::childClass();
     return $class::find()->indexBy('id')->select('name')->column();
 }