Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ogheo/yii2-comments

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-comments Software License Scrutinizer

Comments module for Yii2.

Installation

The preferred way to install this extension is through composer.

try

composer require "ogheo/yii2-comments:*"

or add

"ogheo/yii2-comments": "*"

to the require section of your composer.json file.

Configuration

Database migrations

php yii migrate/up --migrationPath=@vendor/ogheo/yii2-comments/src/migrations

Module setup

'modules' => [
    'comments' => [
        'class' => 'ogheo\comments\Module',
    ]
]

All available options can be viewed in Comments module file.

Usage

Add one of the following examples to the view file.

Basic example

Model is not mandatory, comments will be associated to the current url.

use ogheo\comments\widget\Comments;
    
echo Comments::widget();

Advanced example

To change default settings, you can do as follows:

use ogheo\comments\widget\Comments;
    
echo Comments::widget([
    'model' => $model,
    'model_key' => $model_key,
]);

All available options can be viewed in Comments widget file.

Enjoy ;)

Demo pictures

demo

About

Comments module for Yii2.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.