use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
$request = $client->request('POST', 'servers/123123/sites', [
'headers' => [
'Authorization' => 'Bearer '.$forgeApiToken,
'Accept' => 'application/json',
'Content-Type' => 'application/json'
],
'json' => [
"domain" => "site.com",
"project_type" => "php"
]
]);
return json_decode($request->getBody(), true);
Wednesday, June 28, 2017
Laravel Forge API With Payload
Monday, May 15, 2017
How to get the IP address of the user in Laravel 5.4
use
\Request::ip()
Subscribe to:
Comments (Atom)