return19931112
可以试试这个
$ php composer.phar require kartik-v/yii2-grid "dev-master"
- return19931112 赞了回答
在动作中加上:
Yii::$app->response->headers->add('Access-Control-Allow-Origin', '*');
如果是 dev 环境,请修改
if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', // uncomment the following to add your IP if you are not connecting from localhost. 'allowedIPs' => ['*'], // 这里改为 *,表示允许任何 IP 请求 ]; }
- return19931112 2018-11-22 已签到连续签到11天,获得了20个金钱
可以这么理解,
one()
方法本质是从取出的多条记录中取出第一条public function one($db = null) { $row = parent::one($db); if ($row !== false) { $models = $this->populate([$row]); return reset($models) ?: null; } return null; }
- return19931112 2018-11-21 已签到连续签到10天,获得了20个金钱
- return19931112 2018-11-20 已签到连续签到9天,获得了20个金钱
redis hash
- return19931112 2018-11-19 已签到连续签到8天,获得了20个金钱
- return19931112 2018-11-18 已签到连续签到7天,获得了20个金钱
- return19931112 2018-11-17 已签到连续签到6天,获得了20个金钱