2025-11-10 16:49:05 +08:00
|
|
|
<?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;
|
2025-11-10 16:49:05 +08:00
|
|
|
|
|
|
|
|
#[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();
|
|
|
|
|
|
|
|
|
|
dump($$companies);
|
2025-11-10 16:49:05 +08:00
|
|
|
|
|
|
|
|
$this->line('Hello Hyperf!', 'info');
|
|
|
|
|
}
|
|
|
|
|
}
|