From b78aa582b5549127a19cb0d2e34a565f93ee2ed6 Mon Sep 17 00:00:00 2001 From: Olu Amey Date: Wed, 8 Sep 2021 04:11:00 -0400 Subject: [PATCH] Fixed Routes covit --- app/Config/Routes.php | 1 + app/Services/WpContentsClient.php | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index b6e1dd4..a6a7c9e 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -34,6 +34,7 @@ $routes->setAutoRoute(true); // route since we don't have to scan directories. $routes->get('/', 'Home::index'); +$routes->get('/covit', 'Land::covit',['as'=>'covit']); /* * -------------------------------------------------------------------- * Additional Routing diff --git a/app/Services/WpContentsClient.php b/app/Services/WpContentsClient.php index f16433d..82c3f73 100644 --- a/app/Services/WpContentsClient.php +++ b/app/Services/WpContentsClient.php @@ -5,17 +5,13 @@ use GuzzleHttp\Client as HTTPClient; class WpContentsClient { - public static function serviceGetBlogItems($blogUrl) + public static function serviceGetBlogItems($apiEndpointsUrl) { $client = new HTTPClient(); - $apiEndpointsConfig = $blogUrl; //"http://172.31.4.19:8000"; - // $apiEndpointsConfig = config('ApiEndpoints'); - $response = $client->request( 'GET', - "{$apiEndpointsConfig}/wordpress-data" + "{$apiEndpointsUrl}/wordpress-data" ); - return json_decode($response->getBody()); } }