The minimum requirement by this project template that your Web server supports PHP 7.0.
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
You can then install this project template using the following command:
php composer.phar global require "fxp/composer-asset-plugin:^1.3.1"
git clone https://github.com/taleksey/chat.git chat
cd ./chat
php composer.phar install
Extract the archive file downloaded from https://github.com/taleksey/chat to
a directory named chat that is directly under the Web root.
Set cookie validation key in config/web.php file to some random secret string:
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '<secret random string goes here>',
],You can then access the application through the following URL:
http://localhost/chat
Edit the file config/db.php with real data, for example:
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=chat',
'username' => 'root',
'password' => '1234',
'charset' => 'utf8',
];NOTES:
- Yii won't create the database for you, this has to be done manually before you can access it.
- Check and edit the other files in the
config/directory to customize your application as required.
-
Set
chatas web root path in Apache/Nginx. -
Next step create DB and run migration for creating tables.
yii migration
-
Om main page site you have to input nick name if it was created before we will use it otherwise we will create new. User that is active will be have in right side different color from another users.
-
After you input nick name you can add new messages.