mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
49 lines
973 B
PHP
49 lines
973 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Models\ExamUser;
|
|
use App\Repositories\ExamRepository;
|
|
use Illuminate\Console\Command;
|
|
|
|
class ExamUpdateProgress extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'exam:update_progress {uid}';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Update exam progress.';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function handle()
|
|
{
|
|
$uid = $this->argument('uid');
|
|
$examRep = new ExamRepository();
|
|
$result = $examRep->updateProgress($uid);
|
|
$this->info(REQUEST_ID . ", result: " . var_export($result, true));
|
|
return 0;
|
|
}
|
|
}
|