colibri-platform / base
The Yii2 base extension to build a modular application platform
Installs: 57
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- dektrium/yii2-rbac: ^1.0
- dektrium/yii2-user: ^0.9
- m1/env: 2.1.0
- pheme/yii2-settings: ^0.5
- yiisoft/yii2: ^2.0
- yiisoft/yii2-bootstrap: ^2.0
This package is auto-updated.
Last update: 2020-12-23 16:14:27 UTC
README
This is the base extension to build quickly a modular application platform on Yii2 framework.
Features
- Environment based configuration
- Ready to use Application component
- Web installer to initialize configuration file, database and admin user.
- User management using dektium/user.
- Rbac management using dektrium/rbac.
- Settings management using pheme/settings.
Install
Run the following command to install :
composer require colibri-platform/base
Use
This exemple start a Colibri application in your index.php
require(__DIR__ . '/vendor/autoload.php'); if (!is_dir(__DIR__ . '/assets')) { mkdir(__DIR__ . '/assets'); } \colibri\base\Env::load(__DIR__ . '/.env'); defined('YII_DEBUG') or define('YII_DEBUG', (boolean) getenv('YII_DEBUG')); defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV')? getenv('YII_ENV') : 'prod'); require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); $config = [ 'id' => 'colibri-test', 'name' => 'Colibri test', 'basePath' => __DIR__ ]; (new \colibri\base\WebApplication($config))->run();
Then start the local php web server to run the application :
php -S localhost:8080
Finally go to http://127.0.0.1:8080/ in your browser and follow instruction to finish installation.