Yii2 Simple Chat

A simple chat for your yii2 application


The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist bubasuma/yii2-simplechat

or add

"bubasuma/yii2-simplechat": "~2.0.0"

to the require section of your composer.json file.



Once the extension is installed, simply modify your application configuration as follows:

Use the same configuration for your console application:

Note: You need this configuration to access simple chat via command line. You can remove it in production mode.

You can access Simple Chat via command line as follows:

You can specify different options of the start and reset command:

You can then access Simple Chat through the following URL:

or if you have enabled pretty URLs, you may use the following URL:

You should see the below:

yii simple chat demo page

If not, please check if demo migration has been successfully applied against your database. You can check it by running the following command:

Note: the command above is accessible only if you have configured your console application as it is recommended above.


Extend the main conversation class like follow:

Extend the main message class like follow:

Create a controller like follow:

Note: If you are using this extension in your frontend application, you can find the usage of widgets in index.twig.


Prakash S

Prakash S

I would like to introduce myself as a Software professional opting for the career in software industry. I'm Prakash S, a MCA graduate and trained as industry level practice for Software technology. Basically I am a PHP Developer but now days exploring more in HTML5, CSS, AngularJS and jQuery libraries.