hmtvltk2/yii2-simple-template

Yii 2 Simple Project Template

dev-master 2019-08-27 09:57 UTC

This package is auto-updated.

Last update: 2024-04-27 20:32:19 UTC


README

993323

Yii 2 Simple Project Template


DIRECTORY STRUCTURE

  config/             contains application configurations
  modules/            contains app and contrib modules
  web/                contains the entry script and Web resources

REQUIREMENTS

The minimum requirement by this project template that your Web server supports PHP 5.4.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:

composer create-project --prefer-dist --stability=dev hmtvltk2/yii2-simple-template projectname

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

http://localhost

Or run yii serve, you should be able to access to application to URL:

http://localhost:8080

CONFIGURATION

Database

Edit the file config/db.php with real data, for example:

return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2basic',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];