PHP code example of wiljeonline / google-places

1. Go to this page and download the library: Download wiljeonline/google-places library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wiljeonline / google-places example snippets


use WiljeOnline\GooglePlaces;

$googlePlaces = new GooglePlaces;
$placeDetails = $googlePlaces->getPlaceDetails(); 

use WiljeOnline\GooglePlaces;

$googlePlaces = new GooglePlaces;
$reviews = $googlePlaces->getReviews();

use WiljeOnline\GooglePlaces;

$googlePlaces = new GooglePlaces;
$aggregatedRating = $googlePlaces->getAggregatedRating();
 
$reviews = get_option('wo_reviews');

if( $reviews ) { 
    // Do something with the reviews.
}