OpenADM Basic Project Template Based Yii2


OpenADM Basic Project Template is a skeleton Yii 2 application best for rapidly creating an extensible project.

The template contains the basic features including user management,RBAC and extension management. It includes all commonly used configurations that would allow you to focus on adding new features to your application.

DIRECTORY STRUCTURE

  environments/       contains environment-based overrides
  src/                contains all application's code
  runtime/            contains files generated during runtime
  tools/              contains tools for compress application's assets
  vendor/             contains dependent 3rd-party packages
  web/                contains the entry script and Web resources

REQUIREMENTS

The minimum requirement by this project template that your Web server supports PHP 7.0.0.

INSTALLATION

Install via Composer

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 create-project --prefer-dist --stability=dev openadm/yii2-basic-app basic

CONFIGURATION

Database

Edit the file environments/dev/src/config/db.php with real data for DEV environment:

<?php

$config = [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=127.0.0.1;dbname=yii2',
            'username' => 'root',
            'password' => '123456',
            'charset' => 'utf8',
            'tablePrefix' => 'oa_',
        ],
    ],
];

return $config;

NOTES:

RUN

./init

choose the [1] for DEV environment.

./yii migrate --migrationPath=@openadm/admin/migrations
./yii migrate all -p=@tecnocen/oauth2server/migrations/tables
http://yii2demo.openadm.com