Перенаправить URL-адрес на портале
Код: Выделить всё
$endpoint = "https://eu.app.clio.com/oauth/authorize";
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', $endpoint, ['query' => [
'response_type' => 'code',
'client_id' => '***',
'redirect_uri' => 'http://127.0.0.1/callback',
'redirect_on_decline' => true,
]]);
$statusCode = $response->getStatusCode();
Код: Выделить всё
Route::get('/callback', function () {
Log::error(request()->query('code'));
return response('OK', 200)->header('Content-Type', 'text/plain');
});
Подробнее здесь: https://stackoverflow.com/questions/790 ... -localhost
Мобильная версия