You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
748 B
21 lines
748 B
1 year ago
|
<?php
|
||
|
|
||
|
namespace Plugins\ApiDoc;
|
||
|
|
||
|
use App\Interfaces\PluginsInstallInterface;
|
||
|
|
||
|
class Install implements PluginsInstallInterface
|
||
|
{
|
||
|
|
||
|
public static function run(): void
|
||
|
{
|
||
|
$port = array_filter(\Hyperf\Config\config('server.servers'), fn($v) => $v['name'] == 'http')[0]['port'];
|
||
|
|
||
|
echo "===============================================================\n";
|
||
|
echo "ApiDoc 安装成功。\n";
|
||
|
echo "示例代码查看 ApiDoc/Controller/DemoController.php。\n";
|
||
|
echo "示例效果查看文档访问地址。\n";
|
||
|
echo "文档访问地址: http://127.0.0.1:$port/admin/plugins/api-doc/view\n";
|
||
|
echo "===============================================================\n";
|
||
|
}
|
||
|
}
|