UpdateSeoTdkCrontab.php 1.2 KB
<?php

namespace App\Console\Commands;

use App\Helper\Arr;
use App\Helper\Common;
use App\Helper\Gpt;
use App\Helper\Translate;
use App\Models\Ai\AiCommand;
use App\Models\Mail\Mail;
use App\Models\Project\DeployOptimize;
use App\Models\Project\Project;
use App\Models\Project\ProjectUpdateTdk;
use App\Models\User\User;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;

/**
 * 初始化项目
 * Class InitProject
 * @package App\Console\Commands
 * @author zbj
 * @date 2023/10/8
 */
class UpdateSeoTdkCrontab extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'update_seo_tdk_crontab';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '一键生成tdk';

    /**
     * @return bool
     */
    public function handle()
    {
        $project_ids = Project::where('type', Project::TYPE_TWO)->pluck('id')->toArray();
        foreach ($project_ids as $project_id){
            ProjectUpdateTdk::add_task($project_id);
        }
    }

}