Files
datahub/backend/app/Command/AppCompanySync.php
T

35 lines
730 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace App\Command;
use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;
use Psr\Container\ContainerInterface;
2025-11-10 16:57:45 +08:00
use App\Platform\Tools\Request\CompanyRequest;
#[Command]
class AppCompanySync extends HyperfCommand
{
public function __construct(protected ContainerInterface $container)
{
parent::__construct('app:company:sync');
}
public function configure()
{
parent::configure();
$this->setDescription('Sync companies from Tools Dashboard');
}
public function handle()
{
2025-11-10 16:57:45 +08:00
$companies = CompanyRequest::all();
2025-11-10 16:59:16 +08:00
dump($companies->all());
$this->line('Hello Hyperf!', 'info');
}
}