mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
tag and installer&updater use english
This commit is contained in:
51
app/Console/Commands/MigrateTorrentTag.php
Normal file
51
app/Console/Commands/MigrateTorrentTag.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Repositories\TagRepository;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
use Laravel\Sanctum\PersonalAccessToken;
|
||||
|
||||
class MigrateTorrentTag extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'torrent:migrate_tags';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Migrate exits torrent tags to new structure';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$rep = new TagRepository();
|
||||
$result = $rep->migrateTorrentTag();
|
||||
$log = sprintf('[%s], %s, result: %s, query: %s', REQUEST_ID, __METHOD__, var_export($result, true), last_query());
|
||||
$this->info($log);
|
||||
do_log($log);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Http\Resources\TagResource;
|
||||
use App\Models\Attendance;
|
||||
use App\Models\Exam;
|
||||
use App\Models\ExamProgress;
|
||||
@@ -10,6 +11,7 @@ use App\Models\HitAndRun;
|
||||
use App\Models\Medal;
|
||||
use App\Models\SearchBox;
|
||||
use App\Models\Snatch;
|
||||
use App\Models\Tag;
|
||||
use App\Models\User;
|
||||
use App\Repositories\AgentAllowRepository;
|
||||
use App\Repositories\AttendanceRepository;
|
||||
@@ -60,10 +62,10 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$peerId = '-TR3000-uff7q3z5126z';
|
||||
$agent = 'Transmission/3.00';
|
||||
$rep = new AgentAllowRepository();
|
||||
$r = $rep->checkClient($peerId, $agent, true);
|
||||
$r = Tag::query()->paginate();
|
||||
$resource = TagResource::collection($r);
|
||||
dd($resource->response()->getData(true));
|
||||
echo $r->updated_at;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user