Find us on facebook

Jun 13, 2015

Install Yii2 Advanced Application Template via Composer

Step 1 : Create a folder under your web root (Let's say yii2)
Step 2 : Copy the composer.phar file into to yii2
Step 3 : Go to that folder in cmd
Step 4 : Type in cmd [php composer.phar global require "fxp/composer-asset-plugin:1.0.0"]

Step 5 : Type in cmd [php composer.phar create-project --prefer-dist yiisoft/yii2-app-advanced yii-application]
Step 6 : In middle of the process this would ask for a token.

(To get a token, login to your github profile and generate a token. Steps are as below.
Step A : In the top right corner of any page, click your profile photo, then click Settings.

Step B : Personal access tokensIn the user settings sidebar, click Personal access tokens.


Step C : Generate new token buttonClick Generate new token.


Step D : Token description field Give your token a descriptive name.
Step E:  Selecting token scopesSelect the scopes you wish to grant to this token. The default scopes allow you to interact with public and private repositories, user data.
Step F: Generate token buttonClick Generate token.


[Newly created tokenCopy the token to your clipboard. For security reasons, after you navigate off this page, no one will be able to see the token again.]
)
Step 6 :  Copy and paste this token into cmd and hit enter.

Step 7 :  It says token stored successfully. And install all the packages.


Step 8 : Move to the folder that is project created and Run in cmd [php init]

Step 9 : Create a new database in mysql and adjust the components['db'] configuration in common/config/main-local.php accordingly.


Step 10 : Apply migrations with console command yii migrate.

Step 11 : Open yii2-advanced web on browser





No comments:

Post a Comment