12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /**
- * Created by PhpStorm.
- * User: xiaofeng
- * Date: 2018/3/4
- * Time: 上午9:25
- * 报名
- */
- namespace common\models;
- class PushplaceType extends Common
- {
- public function rules()
- {
- return [
- // [['company','contact'],'required','message'=>'{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;
- }
- }
|