/uas-blog-yii

Primary LanguagePHPMIT LicenseMIT

YII Framework

Documentation

Installation

  • Clone this repository

  • Open with text editor

  • Install all dependencies

    > composer install
  • Initialization

    > php init
  • Open main-local in common/config, to pretty url

    'urlManager' => [
        'enablePrettyUrl' => true,
        'showScriptName' => false
    ],
  • Open main-local in common/config, to setting database

    'db' => [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=localhost;dbname=<your_database>',
        'username' => 'root',
        'password' => '',
        'charset' => 'utf8',
    ],
  • Migrate database

    > php yii migrate

Run

  • Run use local development PHP
    > php -S 127.0.0.1:8000 -t frontend/web
  • You can access 127.0.0.1:8000 in browser