forked from kuafuRace/phprap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHistoryController.php
More file actions
executable file
·46 lines (34 loc) · 1017 Bytes
/
Copy pathHistoryController.php
File metadata and controls
executable file
·46 lines (34 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace app\controllers\home;
use app\models\Apply;
use Yii;
use app\models\LoginLog;
class HistoryController extends PublicController
{
/**
* 登录历史
* @param $project_id
* @return array|string
*/
public function actionLogin()
{
$params = Yii::$app->request->queryParams;
$params['user_id'] = Yii::$app->user->identity->id;
$model = LoginLog::findModel()->search($params);
return $this->display('login', ['model' => $model]);
}
/**
* 申请历史
* @return string
*/
public function actionApply()
{
$params = Yii::$app->request->queryParams;
$params['creater_id'] = Yii::$app->user->identity->id;
$params['pass_status'] = Apply::PASS_STATUS;
$params['refuse_status'] = Apply::REFUSE_STATUS;
$params['order_by'] = 'checked_at desc';
$model = Apply::findModel()->search($params);
return $this->display('apply', ['model' => $model]);
}
}