24 lines
500 B
PHP
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());
|
|
}
|
|
}
|
|
|
|
|