Fixed Routes covit
This commit is contained in:
@@ -34,6 +34,7 @@ $routes->setAutoRoute(true);
|
|||||||
// route since we don't have to scan directories.
|
// route since we don't have to scan directories.
|
||||||
$routes->get('/', 'Home::index');
|
$routes->get('/', 'Home::index');
|
||||||
|
|
||||||
|
$routes->get('/covit', 'Land::covit',['as'=>'covit']);
|
||||||
/*
|
/*
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
* Additional Routing
|
* Additional Routing
|
||||||
|
|||||||
@@ -5,17 +5,13 @@ use GuzzleHttp\Client as HTTPClient;
|
|||||||
|
|
||||||
class WpContentsClient
|
class WpContentsClient
|
||||||
{
|
{
|
||||||
public static function serviceGetBlogItems($blogUrl)
|
public static function serviceGetBlogItems($apiEndpointsUrl)
|
||||||
{
|
{
|
||||||
$client = new HTTPClient();
|
$client = new HTTPClient();
|
||||||
$apiEndpointsConfig = $blogUrl; //"http://172.31.4.19:8000";
|
|
||||||
// $apiEndpointsConfig = config('ApiEndpoints');
|
|
||||||
|
|
||||||
$response = $client->request(
|
$response = $client->request(
|
||||||
'GET',
|
'GET',
|
||||||
"{$apiEndpointsConfig}/wordpress-data"
|
"{$apiEndpointsUrl}/wordpress-data"
|
||||||
);
|
);
|
||||||
|
|
||||||
return json_decode($response->getBody());
|
return json_decode($response->getBody());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user