PHP code example of designbycode / google-maps-place-details
1. Go to this page and download the library: Download designbycode/google-maps-place-details 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/ */
designbycode / google-maps-place-details example snippets
use Designbycode\GoogleMapsPlaceDetails\PlaceDetails;
$placeDetails = new PlaceDetails('YOUR_API_KEY', 'YOUR_PLACE_ID');
$results = $placeDetails->getResults();
$reviews = $placeDetails->getReviews();
$rating = $placeDetails->getRating();
$userRatingTotal = $placeDetails->getUserRatingTotal();
h
$placeDetails = new PlaceDetails('YOUR_API_KEY', 'YOUR_PLACE_ID');
$placeDetails = new PlaceDetails('YOUR_API_KEY', 'YOUR_PLACE_ID');
$placeDetails->getResults()->reviews();