yangshihe/yii2-emoji
Composer 安装命令:
composer require yangshihe/yii2-emoji
包简介
Yii2 emoji
README 文档
README
基于Yii2 处理emoji表情,这次到位。 顾不得格式了,简单些几句.
描述
安装
Either run
$ composer require yangshihe/yii2-emoji
to the require section of your composer.json file.
配置相关
后端部分 use yangshihe\emoji\Emoji; //实现方式: (比如微信公众号的昵称含有表情)则如下: $emoji = new Emoji(); $nickname = $emoji->emoji_unified_to_html($data['nickname']); // OR $nickname = (new Emoji())->emoji_unified_to_html($data['nickname']); // 然后存入数据库神马的 //........ //前端部分 需要视图的部分// use yangshihe\emoji\EmojiAsset; //按需加载 EmojiAsset::register($this->getView()); //OR //依赖加载 //AppAsset.php public $depends = [ 'yii\web\YiiAsset', .......code......... 'yangshihe\emoji\EmojiAsset' ]; // 然后你就能看到和微信一模一样的表情了.
Demo
暂无
统计信息
- 总下载量: 83
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: null
- 更新时间: 2016-08-18