Installing the framework
Yii2 is a modern PHP framework provided as a Composer package. In this recipe, we will install the framework via the Composer package manager and configure the database connection for our application.
Getting ready
First of all, install the Composer package manager on your system.
Note
Note: If you use the OpenServer application on Windows, than the composer
command already exists in the OpenServer terminal.
In Mac or Linux download the installer from https://getcomposer.org/download/ and install it globally by using the following command:
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
In Windows without OpenServer download and run Composer-Setup.exe
from the https://getcomposer.org/doc/00-intro.md ...
Get Yii2 Application Development Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.