bafeiyu / hyperf_zerossl
zerossl package for hyperf framework
dev-main
2023-03-07 05:19 UTC
Requires
- php: >=7.4
- hyperf/guzzle: ~2.2.0
This package is auto-updated.
Last update: 2025-03-09 06:21:17 UTC
README
安装
composer require bafeiyu/hyperf_zerossl
命令行运行命令生成配置文件
php bin/hyperf.php vendor:publish bafeiyu/hyperf_zerossl
使用
<?php use Bafeiyu\HyperfZeroSsl\ZeroSslFactory; use Hyperf\Utils\ApplicationContext; $zerossl = ApplicationContext::getContainer()->get(ZeroSslFactory::class); $cert = $zerossl()->certificate->create( 'test.com', 'test',75,0 ); $status = $cert->getStatusCode(); $return = json_decode($cert->getBody()->getContents());