<?php

namespace App\Helpers;
use GuzzleHttp\Client;


Trait Apihelpers
{
    
    
    public static function review_api($locatorID=null)
    {
        $api = config('app.api').$locatorID.'/reviews';
        $client = new Client();
        $response = $client->request('GET', $api,[ 'headers' => [
            'Accept'     => 'application/json',
            'Authorization'  => config('app.api_key')]
        ]);
    	$statusCode = $response->getStatusCode();
        $body = $response->getBody()->getContents();
        return $locationDetailAPIdata = json_decode($body,true);
    }

}