12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Console\Commands;
- use Illuminate\Console\Command;
- use App\Models\User;
- use App\Utils\Helper;
- class ImportReset extends Command
- {
-
- protected $signature = 'import:reset';
-
- protected $description = '为导入用户重置所有uuid及token';
-
- public function __construct()
- {
- parent::__construct();
- }
-
- public function handle()
- {
- $user = User::all();
- foreach ($user as $item) {
- $item->v2ray_uuid = Helper::guid(true);
- $item->token = Helper::guid();
- $item->save();
- }
- }
- }
|