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 :

  1. Admin : can do everything
  2. Editor : can edit, add and view
  3. Author : can add and view
  4. viewer ; just viewer

 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 :

  1. Admin : can do everything
  2. Editor : can edit, add and view
  3. Author : can add and view
  4. viewer ; just viewer

 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


 

Leave a Comment:


ali one month ago

awesome cool

sintret one month ago

http://localhost/basic/web/gii

992879 3 months ago

How can I access to Gii page?

992879 3 months ago

How can I access to Gii page?

10154645614954510 11 months ago

Excellent job! you are so diligent in software development. I installed it, very fast and easy, I will try to build a lightweight social crm with this project.

sintret one year ago

passwordnya : 123456

114179950999883213073 one year ago

gan saya sudah signup di form loginnya tapi kok nggak bisa signin ya passwordnya apa

222749514746886 one year ago

Timely blog post . Speaking of which , if your company wants a a form , my colleagues filled out and faxed a sample version here http://pdf.ac/1DTCjj ?


admin 2 years ago

coba di rubah di config/web.php, untuk kata2 projects di ganti dengan "nama projects" anda $config = [ 'id' => 'sintret-projects', 'name' => 'Sintret Projects', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'layout' => 'adminlte', 'homeUrl' => '/projects', 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'hQtvUtJQWdasasaeXS5OLnuwiDPkB4ixYwQD', 'baseUrl' => '/projects', ],

15966530205772877 2 years ago

tanya dong, ini untuk settingan urlnya agar jalan seperti biasa (misal nama folder yiibasic) runnya di localhost/yiibasic gimn? soalnya ane install sesuai petunjuk, ke redirect ke localhost/projects/login.. terima kasih


digital_ocean