add:域名管理first commit
This commit is contained in:
25
catch/domain/support/driver/ApiTrait.php
Normal file
25
catch/domain/support/driver/ApiTrait.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin [Just Like ~ ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
||||
namespace catchAdmin\domain\support\driver;
|
||||
|
||||
use catcher\facade\Http;
|
||||
use catchAdmin\domain\support\CommonParams;
|
||||
|
||||
trait ApiTrait
|
||||
{
|
||||
public function get(array $params)
|
||||
{
|
||||
$name = config('catch.domains.default');
|
||||
|
||||
return Http::query(CommonParams::{$name}($params))
|
||||
->get(config('catch.domains.' . $name . '.api_domain'))->json();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user