PHP code example of manuxi / google-reviews-bundle
1. Go to this page and download the library: Download manuxi/google-reviews-bundle 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/ */
manuxi / google-reviews-bundle example snippets
// src/Controller/MyController.php
use Manuxi\GoogleReviewsBundle\ManuxiGoogleReviews;
// ...
class MyController
{
public function index(ManuxiGoogleReviews $googleReviews)
{
$reviews = $googleReviews->getReviews();
$overallCount = $googleReviews->getReviewsCount();
// ...
}
}
// ...
$reviews = $googleReviews->getReviews(2, 3); //returns 3 elements, starting at offset 2
// ...