ensostudio/yii2-app

Yii2 application template

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:project

1.0.0 2022-04-23 20:51 UTC

This package is auto-updated.

Last update: 2022-06-23 21:17:51 UTC


README

The skeleton of Yii 2 application best for rapidly creating your projects.

The template contains the basic features including user login/logout and a contact page. It includes all commonly used configurations that would allow you to focus on adding new features to your application.

Latest Stable Version Total Downloads

DIRECTORY STRUCTURE

  • assets the source scripts, styles and etc.
  • config the application configurations
  • messages the I18n translations
  • migrations the database migrations (namespace app\migrations)
  • modules the application modules (namespace app\modules)
  • public the front-end entry script and assets
    • backend the backend-end entry script and assets
  • runtime the cache and logs
  • src the PHP sources (classes, interfaces and traits in namespace app)
    • commands the CLI controllers (running by yii script)
    • controllers the Web controllers
    • models the models
  • tests the unit tests
  • vendor the required 3rd-party packages
  • views the views/templates
    • mails the e-mail views
    • layouts the page layouts

REQUIREMENTS

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

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:

composer create-project --prefer-dist ensostudio/yii2-app your-app

Now you should be able to access the application through the following URL, assuming your-app is the directory directly under the Web root.

http://localhost/your-app/public/

CONFIGURATION

Database

Edit the file config/db.php with real data.

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.

TESTING

Tests are located in tests directory. They are developed with PHPUnit.

Edit the file config/test.php and tests/bootstrap.php to configure your test application.

Tests can be executed by running

composer run tests