Route::get('/biller-
info','MyDomain\Http\Controllers\BillPaymentController@getBillerInfo');
API的所有其他路由都是这样创建的.
获取异常目标类[Mydomain\Http\Controllers\BillPaymentController]不存在.
已安装guzzleHTTPS.
道路-127.0.0.1/billier-信息
路径-API&>包&>my域-shop&>资源&>;http&>;控制器&>BillPaymentController.php
BillPaymentController.php
<?php
namespace MyDomain\Http\Controllers;
use Exception;
use Illuminate\Http\Request;
use MyDomain\Enums\Permission;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use MyDomain\Exceptions\MyDomainException;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Http;
class BillPaymentController extends CoreController
{
public function getBillerInfo()
{
$response = Http::get('https://reqres.in/api/products/3');
dd($response->collect());
}
}