'{attribute}不能为空'], // [['aptitude','copyright','privacy'],'string'] ]; } public function city1() { $city1 = self::find()->where(['type' => 1, 'state' => 1])->orderBy(['sort' => SORT_DESC, 'create_at' => SORT_DESC])->asArray()->all(); return $city1; } public function city2() { $city2 = self::find()->where(['type' => 2, 'state' => 1])->orderBy(['sort' => SORT_DESC, 'create_at' => SORT_DESC])->asArray()->all(); return $city2; } public function boutiquevilla() { $data = self::find()->where(['type' => 3, 'state' => 1])->limit(2)->orderBy(['sort' => SORT_DESC, 'create_at' => SORT_DESC])->asArray()->all(); return $data; } }