Files
nexusphp/app/Console/Commands/Test.php

87 lines
2.4 KiB
PHP
Raw Normal View History

2021-04-21 00:07:32 +08:00
<?php
namespace App\Console\Commands;
2025-06-09 19:16:43 +07:00
use App\Jobs\CheckQueueFailedJobs;
use App\Jobs\SettleClaim;
2025-06-17 20:54:18 +07:00
use App\Jobs\UpdateUserDownloadPrivilege;
use App\Models\ExamUser;
2025-04-20 18:13:46 +07:00
use App\Models\Language;
2025-06-22 02:02:14 +07:00
use App\Models\Message;
2025-03-29 14:32:31 +07:00
use App\Models\PersonalAccessToken;
2025-04-17 01:39:40 +07:00
use App\Models\Torrent;
2025-05-16 02:43:45 +07:00
use App\Models\TorrentExtra;
2025-04-17 01:39:40 +07:00
use App\Models\User;
2025-05-16 14:19:06 +07:00
use App\Repositories\ClaimRepository;
use App\Repositories\ExamRepository;
2025-05-11 02:33:22 +07:00
use App\Repositories\SeedBoxRepository;
2025-06-22 20:43:04 +07:00
use App\Repositories\TokenRepository;
2025-04-17 01:39:40 +07:00
use App\Repositories\UploadRepository;
2021-04-21 00:07:32 +08:00
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
2025-06-22 02:02:14 +07:00
use Nexus\Database\NexusDB;
2025-05-16 02:43:45 +07:00
use Nexus\PTGen\PTGen;
2022-08-04 00:48:42 +08:00
use NexusPlugin\Menu\Filament\MenuItemResource\Pages\ManageMenuItems;
use NexusPlugin\Menu\MenuRepository;
use NexusPlugin\Menu\Models\MenuItem;
2022-08-19 15:30:16 +08:00
use NexusPlugin\Permission\Models\Role;
use NexusPlugin\PostLike\PostLikeRepository;
2022-06-08 14:15:59 +08:00
use NexusPlugin\StickyPromotion\Models\StickyPromotion;
2022-06-08 20:47:34 +08:00
use NexusPlugin\StickyPromotion\Models\StickyPromotionParticipator;
use NexusPlugin\Work\Models\RoleWork;
use NexusPlugin\Work\WorkRepository;
2025-04-17 01:39:40 +07:00
use Stichoza\GoogleTranslate\GoogleTranslate;
2021-04-21 00:07:32 +08:00
class Test extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'test:test';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Just for test';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
2025-06-17 20:54:18 +07:00
// $failedJob = DB::table('failed_jobs')->find(569);
2025-06-09 19:16:43 +07:00
//
// $payload = json_decode($failedJob->payload, true);
// dd($payload);
//
// $base64 = $payload['data']['command'];
// $job = unserialize($base64);
//
// dd($job);
2025-05-16 02:43:45 +07:00
2025-06-17 20:54:18 +07:00
// UpdateUserDownloadPrivilege::dispatch(1, "yes", "test_key");
// $res = unserialize("O:36:\"App\\Jobs\\UpdateUserDownloadPrivilege\":3:{s:6:\"userId\";i:1;s:6:\"status\";s:3:\"yes\";s:9:\"reasonKey\";s:8:\"test_key\";}");
// $res = unserialize("O:36:\"App\\Jobs\\UpdateUserDownloadPrivilege\":3:{s:6:\"userId\";i:1;s:6:\"status\";s:3:\"yes\";s:9:\"reasonKey\";s:8:\"test_key\";}");
// dd($res);
2025-06-22 20:43:04 +07:00
$r = TokenRepository::listUserTokenPermissionAllowed();
dd($r);
2021-04-21 00:07:32 +08:00
}
2021-04-21 00:07:32 +08:00
}