asp / commenter
评论应用API
dev-master
2016-03-03 15:46 UTC
Requires
- guzzlehttp/guzzle: 6.*
- illuminate/html: 5.*
Requires (Dev)
- guzzlehttp/guzzle: 6.*
- illuminate/html: 5.*
This package is not auto-updated.
Last update: 2024-09-14 18:31:33 UTC
README
安装:将以下内容添加到 config/app.hp 中的 "providers" 数组:'asp\commenter\CommenterServiceProvider',并将以下内容添加到 config/app.php 中的 "aliases" 数组:'Commenter' => 'asp\commenter\Helpers\Commenter'。运行 "Composer update",然后运行 "php artisan vendor:publish"。在 config/CommenterConfig.php 中设置API密钥。使用方法:您必须通过键 'user' 在会话中设置用户名,以启用评论和回复。只需添加以下代码,返回如下所示的 'comments' 变量:$view= \Commenter::loadComment(); return \View::make('welcome')->with('comments',$view); 然后在您的视图中,将以下片段插入到您想要渲染评论的任何位置:@if(isset($comments)) @endif