cxgj/commands/CronController.php
2023-11-27 09:45:13 +08:00

40 lines
846 B
PHP

<?php
/**
* @author Any
* @description KISS
* @date 2020-11-25
* @version 1.0.0
*
* _____LOG_____
*
*/
namespace app\commands;
use yii\console\Controller;
use yii\console\ExitCode;
use app\models\UserToken;
/**
* This command echoes the first argument that you have entered.
*
* This command is provided as an example for you to learn how to create console commands.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class CronController extends Controller
{
/**
* This command echoes what you have entered as the message.
* @param string $message the message to be echoed.
* @return int Exit code
*/
public function actionExpires()
{
//清除失效token
UserToken::expiresHandler();
return ExitCode::OK;
}
}