Book Image

Yii Project Blueprints

By : Charles R. Portwood ll
Book Image

Yii Project Blueprints

By: Charles R. Portwood ll

Overview of this book

Table of Contents (15 chapters)
Yii Project Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Initializing the project


At this point, you should be fairly familiar with how to initialize a basic Yii framework project. Go ahead and create the base folder structures, and create the index.php, yiic, yiic.bat, and yiic.php files. Then in the webroot directory of our application, create a folder called vendors. This folder will be used for all of our Composer dependencies for us.

Create a MySQL user and database

If you haven't already created a MySQL user, password, and database for the project, do so now. From the MySQL command line, you can run the following commands to do this:

CREATE USER 'ch3_reminders'@'localhost' IDENTIFIED BY 'ch3_reminders';
CREATE DATABASE IF NOT EXISTS `ch3_reminders`;
GRANT ALL PRIVILEGES ON `ch3\_reminders` . * TO 'ch3_reminders'@'localhost';

Creating a Yii configuration file

Our Yii configuration file will be slightly different than our previous configuration files due to the use of our MySQL database. We'll start off with the base configuration protected/config...