pa3py6aka/yii2-advanced-optimized

Yii2 optimized template based on advanced template

1.0.4 2019-06-10 14:47 UTC

This package is auto-updated.

Last update: 2020-05-10 17:09:39 UTC


README

993323

Yii 2 Advanced and Slightly Optimized Template


Latest Stable Version Total Downloads Build Status

Yii 2 Advanced Optimized Project Template is the fork of Yii2 Advanced template.

Note: This is alpha version of template. All contributings are welcome!

Whats new

  • Uses Bootstrap 4
  • Authorization forms in modal blocks with ajax validation
  • Authorization by social networks using yiisoft/yii2-authclient
  • Default RBAC. Uses three roles - user, moderator, admin. User can manage his content, moderator can manage all users content, admin has moderators access. You can apply to admins more privileges. Manage it in console/controllers/RbacController.php. After changes, execute php yii rbac/init command in the terminal (of course you must be in project directory).
  • IDE autocompletion for custom components. Not forget exclude or "Mark as Plain Text" vendor/yiisoft/yii2/Yii.php file.
  • Added frontend and backend url manager components. And url rules moves in separates files.
  • Tabler template for backend on Bootstrap 4 (Tabler)
  • And more

Installation

By Composer:
composer create-project --prefer-dist pa3py6aka/yii2-advanced-optimized my-new-application

The command installs the project in a directory named my-new-application. You can choose a different directory name if you want.

Open a console terminal, execute the init command and select dev as environment.

/path/to/php-bin/php /path/to/yii-application/init

Create a new database and adjust the components['db'] configuration in /path/to/yii-application/common/config/main-local.php accordingly.

Open a console terminal, apply migrations with command /path/to/php-bin/php /path/to/yii-application/yii migrate.

Initialize RBAC:

/path/to/php-bin/php /path/to/yii-application/yii rbac/init

Create Administrator user: Sign up on frontend site, then go to console and assign admin role to created user:

/path/to/php-bin/php /path/to/yii-application/yii roles/assign

Contributing

All contributings are welcome!