Files
MermsWebsite2021/app/Services/WpContentsClient.php
T
2021-09-06 17:44:35 -04:00

24 lines
500 B
PHP

<?php
namespace App\Services;
use GuzzleHttp\Client as HTTPClient;
class WpContentsClient
{
public static function serviceGetBlogItems($blogUrl)
{
$client = new HTTPClient();
$apiEndpointsConfig = $blogUrl; //"http://172.31.4.19:8000";
// $apiEndpointsConfig = config('ApiEndpoints');
$response = $client->request(
'GET',
"{$apiEndpointsConfig}/wordpress-data"
);
return json_decode($response->getBody());
}
}