openadm / yii2-basic-app
OpenAdm是一个基于Yii2的后台开源骨架,集成了用户和插件系统,使用主题功能,默认使用AdminLTE2的模板的主题,可以非常方便的开发新的功能。
Requires
- php: >=7.0.0
- openadm/yii2-admin: *
Requires (Dev)
- yiisoft/yii2-debug: ~2.0.0
- yiisoft/yii2-faker: ~2.0.0
- yiisoft/yii2-gii: ~2.0.0
This package is auto-updated.
Last update: 2024-11-29 00:27:36 UTC
README
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:
- 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.
RUN
Init the project with the command 'init', enter in the directory 'baisc'
./init
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 http://127.0.0.1:802/
./yii serve/index 127.0.0.1:802 -t web