Skip to content

Instantly share code, notes, and snippets.

@pangpond
Last active August 3, 2016 09:51
Show Gist options
  • Save pangpond/fe70498060ec713d3fb79b32dc7b6f43 to your computer and use it in GitHub Desktop.
Save pangpond/fe70498060ec713d3fb79b32dc7b6f43 to your computer and use it in GitHub Desktop.
$ composer create-project yiisoft/yii2-app-advanced advanced 2.0.9

composer.json

"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"phpoffice/phpexcel": "~1.8",
"kartik-v/yii2-widget-select2" : "2.0.3",
"kartik-v/yii2-widget-datepicker" : "@dev",
"kartik-v/yii2-widget-depdrop": "@dev",
"kartik-v/yii2-dynagrid": "@dev",
"kartik-v/yii2-mpdf": "*",
"kartik-v/yii2-widget-fileinput": "*",
"kartik-v/yii2-widget-datetimepicker" : "*",
"kartik-v/yii2-date-range": "*",
"kartik-v/yii2-widget-timepicker": "*",
"dektrium/yii2-rbac": "dev-master",
"kartik-v/yii2-widget-alert": "*",
"kartik-v/yii2-widget-growl": "*",
"kartik-v/yii2-tree-manager": "@dev",
"kartik-v/yii2-export": "dev-master",
"kartik-v/yii2-helpers": "dev-master",
"kartik-v/yii2-widget-activeform": "@dev",
"kartik-v/yii2-popover-x": "*",
"kartik-v/yii2-nav-x": "*",
"creocoder/yii2-flysystem": "0.8.*",
"kartik-v/yii2-slider": "*",
"kartik-v/yii2-field-range": "*",
"kartik-v/yii2-widgets": "*",
"nextgensoft/formatter": "dev-master",
"kartik-v/yii2-editable" : "@dev",
"kartik-v/yii2-icons": "@dev"

sqlite

mkdir data
cd data
sqlite3 ischool.db
create table receive(id INTEGER PRIMARY KEY,one varchar(10), two smallint);
insert into receive values(1, 'hello!',10);
insert into receive values(2, 'goodbye', 20);
select * from receive;
.quit

config/db.php

return [
    'class' => 'yii\db\Connection',
    'dsn' => 'sqlite:@app/data/ischool.db',
];

add mofule to config/web.php

'modules' =>[
        'dynagrid' => [
            'class' => '\kartik\dynagrid\Module',
            // other module settings
        ],
        'gridview' => [
            'class' => '\kartik\grid\Module',
            // other module settings
        ],
       'treemanager' =>  [
            'class' => '\kartik\tree\Module',
            // other module settings, refer detailed documentation
        ]
    ],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment