add tools request libs, migrate for hyperf framework

This commit is contained in:
2025-11-10 16:48:19 +08:00
parent 5b3b0c70f2
commit 08bb2af2c3
11 changed files with 749 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Platform\Tools;
use function Hyperf\Config\config;
Trait RequestTrait
{
static function getHost() : string
{
// is debug mode
if(config('tools.debug', false)){
// use tools test host
return config('tools.host_test');
}
return config('tools.host');
}
static function getHash() : string
{
// is debug mode
if(config('tools.debug', false)){
// use tools test host
return config('tools.token_test');
}
return config('tools.token');
}
}