12345678910111213141516171819202122232425262728293031323334 |
- <?php
- /**
- * Created by PhpStorm.
- * User: xiaofeng
- * Date: 2018/3/4
- * Time: 上午9:28
- */
- namespace common\models;
- class AstrictPhone extends Common
- {
- public function rules()
- {
- return [
- ['mobile', 'number', 'message' => '请输入正确的电话号码'],
- ];
- }
- public function getList($input)
- {
- $query = self::find();
- $query->offset(($input['page']-1)*$input['limit']);
- $query->limit($input['limit']);
- return $query->asArray()->all();
- }
- public function getTotal()
- {
- $query = self::find();
- return $query->count();
- }
- }
|