1. Go to this page and download the library: Download marshmallow/reviews-kiyoh 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/ */
marshmallow / reviews-kiyoh example snippets
use Marshmallow\Reviews\Kiyoh\Facades\KiyohInvite;
use Marshmallow\Reviews\Kiyoh\Exceptions\KiyohException;
try {
KiyohInvite::email('[email protected]')
/**
* Optional
*/
->supplier('Marshmallow')
->firstName('Stef')
->lastName('van Esch')
->refCode('Order: #1001')
->city('Alphen aan den Rijn')
->delayIgnoreWeekend(3)
/**
* Always end with invite()
*/
->invite();
} catch (KiyohException $e) {
/**
* You should always try-catch this. Kiyoh can
* through an error if someone has already received
* an invitation. If this is thrown, you don't want
* you code to be killed!
*/
}
use Marshmallow\Reviews\Kiyoh\Facades\Kiyoh;
Kiyoh::feed()->average()
Kiyoh::dontFail()->feed()->average();
$reviews = Kiyoh::withoutCache()->feed();
foreach ($reviews as $review) {
// Do your own magic here
}