Skip to content

Commit

Permalink
Merge pull request #130 from cashwarden/feature/cw-12
Browse files Browse the repository at this point in the history
fix: fix bug
  • Loading branch information
forecho committed Oct 12, 2021
2 parents 9936146 + 98c6a2a commit 68aaa6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/backend/controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use app\core\models\User;
use app\modules\backend\models\LoginForm;
use Carbon\Carbon;
use Yii;
use yii\web\Response;
use yiier\helpers\DateHelper;

class SiteController extends \yii\web\Controller
{
Expand All @@ -21,8 +21,8 @@ public function actionIndex()
if (Yii::$app->user->isGuest) {
return $this->redirect('login');
}
$start = DateHelper::beginTimestamp();
$end = DateHelper::endTimestamp();
$start = Carbon::now()->startOfDay()->toDateTimeString();
$end = Carbon::now()->endOfDay()->toDateTimeString();
$todayUserTotal = User::find()->where(['between', 'created_at', $start, $end])->count();
return $this->render('index', [
'todayUserTotal' => $todayUserTotal,
Expand Down
2 changes: 1 addition & 1 deletion modules/backend/controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function actionIndex()
'email' => request('email'),
]),
'pagination' => [
'pageSize' => 2,
'pageSize' => 20,
],
'sort' => ['defaultOrder' => ['id' => SORT_DESC]]
]);
Expand Down
Binary file added web/favicon.ico
Binary file not shown.

0 comments on commit 68aaa6a

Please sign in to comment.