20 lines
377 B
PHP
20 lines
377 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
use GuzzleHttp\Client as HTTPClient;
|
|
|
|
class WpContentsClient
|
|
{
|
|
public static function serviceGetBlogItems($apiEndpointsUrl)
|
|
{
|
|
$client = new HTTPClient();
|
|
$response = $client->request(
|
|
'GET',
|
|
"{$apiEndpointsUrl}/wordpress-data"
|
|
);
|
|
return json_decode($response->getBody());
|
|
}
|
|
}
|
|
|
|
|