Embed rating

Installs: 63

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0


0.5.0 2021-03-27 04:22 UTC

This package is auto-updated.

Last update: 2022-04-27 06:48:06 UTC


Embed rating


composer require ramphor/embrati


Create Embrati instance

$embrati  = Embrati::getInstance('your_instance_name');

Register Javascript scripts.

// Register script for frontend

// Register script for admin

Create rating UI

The options is RaterJS options. You can see list options at here: https://auxiliary.github.io/rater/

$options = array();
$embrati->create('rating_id', $options);

Display rating only

You need show star rating only please call below method This feature use css-star-rating to show stars. You can check documnent at here: https://github.com/BioPhoton/css-star-rating

$options = array(
  'max' => 5,
  'use_svg' => true,
  'rating' => 2.5 // This is rating value to show stars
$embrati->display('rating_id', $options);