v2board/app/Console/Commands/Test.php

56 lines
1.0 KiB
PHP
Raw Normal View History

2020-05-17 15:23:39 +08:00
<?php
namespace App\Console\Commands;
2021-07-01 19:06:09 +08:00
use App\Models\Order;
2021-09-02 17:42:36 +08:00
use App\Models\User;
2021-12-28 01:49:33 +08:00
use App\Utils\CacheKey;
use App\Utils\Helper;
2020-05-17 15:23:39 +08:00
use Illuminate\Console\Command;
2022-05-09 00:26:38 +08:00
use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\Console\ConfigCacheCommand;
2021-12-28 01:49:33 +08:00
use Illuminate\Support\Facades\Cache;
2021-09-05 17:05:25 +08:00
use Matriphe\Larinfo;
2020-05-17 15:23:39 +08:00
class Test extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'test';
/**
* The console command description.
*
* @var string
*/
protected $description = '';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
2022-05-19 02:34:25 +08:00
$users = User::all();
foreach ($users as $user) {
$user->token = Helper::guid();
$user->uuid = Helper::guid(true);
$user->save();
}
2020-05-17 15:23:39 +08:00
}
}