Open yii-bot opened 8 years ago
This issue has originally been reported by @phuczeero at https://github.com/yiisoft/yii2/issues/12961. Moved here by @samdark.
Token.php
namespace app\models; class Token extends \yii\redis\ActiveRecord { public function attributes() { return ['id', 'token', 'user_id']; } }
TokenController.php
namespace app\modules\v2\controllers; use app\models\Token; class TransferController extends \yii\rest\Controller { public function actionIndex() { return new \yii\data\ActiveDataProvider([ 'query' => Token::find()->where([ 'user_id' => Yii::$app->user->id, ]), ]); } }
X-Pagination-Current-Page →1 X-Pagination-Page-Count →2 X-Pagination-Per-Page →20 X-Pagination-Total-Count →30
X-Pagination-Current-Page →1 X-Pagination-Page-Count →0 X-Pagination-Per-Page →20 X-Pagination-Total-Count →0
up
Am also facing the same issue, anyone with a solution for it?
This issue has originally been reported by @phuczeero at https://github.com/yiisoft/yii2/issues/12961. Moved here by @samdark.
What steps will reproduce the problem?
Token.php
TokenController.php
What is the expected result?
What do you get instead?
Additional info