32 lines
598 B
PHP
32 lines
598 B
PHP
<?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');
|
|
}
|
|
}
|