$username])->first(); } /** * 获取用户by id */ public static function getCpUserById($id) { return self::where(['id'=>$id])->first(); } }