Watch 2 Star 1 Fork 1

OpenADM / yii2-basic-appApache-2.0

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
Nothing here. spread retract

Clone or download 2.84 KB
Copy Edit Web IDE Raw Blame History
OpenADM authored 2019-06-15 15:55 . 增加oauth2server

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.


  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


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


Install via Composer

If you do not have Composer, you may install it by following the instructions at

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



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


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

return $config;


  • 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.


  • Init the project with the command 'init', enter in the directory 'baisc'

choose the [1] for DEV environment.

  • Migrate DB
/yii migrate --migrationPath=@openadm/admin/migrations
./yii migrate all -p=@tecnocen/oauth2server/migrations/tables
  • Now you should be able to access the application through the following URL, assuming basic/web is the directory directly under the Web root of

Comment ( 0 )

Sign in for post a comment


Help Search