Super fast create application using Yii2 Basic Template with feature like adminlte, chat, whatsapp messaging, ckeditor, todolist, whatsapp, graphic, signup form, easy rbac manager using dbmanager and many many feature
I will show you how to deploy Yii2 with easyly. this template include module upload excel to system, chat, whatsapp, todolist,rbac dbmanager
Please update your asset plugin first like these following code :
composer global require "fxp/composer-asset-plugin:1.0.0"
BASIC TEMPLATE
Go to your project directory, case in my linux debian as cd /usr/share/nginx/html/project
we will using composer to download and install application template with adminlte.
lets get with your console:
composer create-project sintret/yii2-basic --prefer-dist your-folder-directory-name
you just get coffe and waiting until download and instalation process done. ok, and then go to your project directory and execute init with "php init".
edit your config db.php and change your dbname
dsn' => 'mysql:host=localhost;dbname=yii2basic',
dont forget to create database with the same configuration as dbname.
we need migrate to create table chat, user, todolist,log upload,dynagrid, notification.
After its done, you need migration like these following
yii migrate
ok, we need again to user
just using like these following code :
yii insert/init
finaly we create rbac dbmanager with simple code, you can see in folder "console/RbacController" with specific level for :
create rbac :
yii migrate --migrationPath=@yii/rbac/migrations
yii rbac/init
dont forget to chmod -R 777 on your web/assets in your linux environment
and please free to update your setting on menu setting
ADVANCED TEMPLATE
composer create-project sintret/yii2-advanced --prefer-dist your-folder-directory-name
and then go to your project folder,
php init
select your envirenmont , development or production
edit your config db in folder common/config/main-local.php
<?php
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
],
'authManager' => [
'class' => 'yii\rbac\DbManager',
],
],
];
we need migrate to create table chat, user, todolist,log upload,dynagrid, notification.
After its done, you need migration like these following
"./yii migrate" in linux, or in windows "yii migrate".
ok, we need again to user
just using like these following code :
"yii insert/init"
finaly we create rbac dbmanager with simple code, you can see in folder "console/RbacController" with specific level for :
create rbac :
"yii migrate --migrationPath=@yii/rbac/migrations
"
"yii rbac/init"
dont forget to chmod -R 777 on your web/assets if linux environment
and plese free to update your setting on menu setting