ramphor/embrati
Composer 安装命令:
composer require ramphor/embrati
包简介
Embed rating
README 文档
README
Embed rating
Install
composer require ramphor/embrati
Usage
Create Embrati instance
$embrati = Embrati::getInstance('your_instance_name');
Register Javascript scripts.
// Register script for frontend
$embrati->registerScripts();
// Register script for admin
$embrati->registerAdminScripts();
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);
统计信息
- 总下载量: 96
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-only
- 更新时间: 2020-10-02