定制 asinfotrack/yii2-comments 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

asinfotrack/yii2-comments

Composer 安装命令:

composer require asinfotrack/yii2-comments

包简介

Yii2-comments is a behavior and a set of widgets to enable generic commenting on Yii2-ActiveRecord-Models

README 文档

README

Yii2-comments is a behavior and a set of widgets to enable commenting on Yii2-ActiveRecord-Models

Advantages

This is not the first commenting extension. So why use this one? Those are some of the major advantages:

  • this extension works with composite primary keys
  • the handling and configuration couldn't be simpler
  • awesome widgets to show, list and add comments

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require asinfotrack/yii2-comments

or add

"asinfotrack/yii2-comments": "~0.8.2"

to the require section of your composer.json file.

Migration

After downloading everything you need to apply the migration creating the audit trail entry table:

yii migrate --migrationPath=@vendor/asinfotrack/yii2-comments/migrations

To remove the table just do the same migration downwards.

Usage

Behavior

Attach the behavior to your model and you're done:

public function behaviors()
{
    return [
    	// ...
    	'comments'=>[
    		'class'=>CommentBehavior::class,
    		
    		//TODO: comment this
    	],
    	// ...
    ];
}

Widget

The widget is also very easy to use. Just provide the model to get the audit trail for:

<?= Comments::widget([
	'model'=>$model,
	
	// some of the optional configurations
	//TODO: comment this
]) ?>

Changelog

Learn about the latest improvements.

统计信息

  • 总下载量: 570
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固