allocatr/application/admin/command/Test.php
2025-04-01 17:20:28 +08:00

27 lines
587 B
PHP

<?php
namespace app\admin\command;
use app\admin\addresmart\Address;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class Test extends Command
{
protected function configure()
{
$this->setName('test')
->setDescription('批量生成区域名称的拼音');
}
protected function execute(Input $input, Output $output)
{
$string = '张三 13800138000 120113196808214821深圳市龙华区龙华街道1980科技文化产业园3栋317 地板';
$r = Address::smart($string);
dd($r);
}
}