Download the PHP package bubasuma/yii2-simplechat without Composer
On this page you can find all versions of the php package bubasuma/yii2-simplechat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-simplechat
Yii2 Simple Chat
A simple chat for your yii2 application
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Demo
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:
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.
Usage
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
.
FAQ
Does this extension work with any template engines other than twig
?
Yes. Given that, the default render in yii2
is php
, you must indicate explicitly the extension part in view names.
Can I use this extension in a RESTful APIs?
Yes, You can.
Can I use different template engines for rendering in server side and client side?
Yes. But using the same template in both sides remains the best implementation.