Book Image

Web Application Development with Yii 2 and PHP

By : Mark Safronov, Jeffrey Winesett
Book Image

Web Application Development with Yii 2 and PHP

By: Mark Safronov, Jeffrey Winesett

Overview of this book

<p>Yii is a high performance PHP framework used for rapid web application development. It is well designed, well supported, easy to learn, and easy to maintain. This book embraces the learn-by-example methodology to show you the most important features of the Yii 2 framework. Throughout the course of this book, you will build a simple real-world application; each chapter will introduce you to a new functionality and show you how to tweak your application. Instead of trying to be an all-encompassing reference about the framework, this is a walkthrough of the really important pieces of information that you have to understand in detail.</p> <p>You will learn how to use Yii's active record and CRUD scaffolding to manage the data in your database. Authentication, extensions, events and behaviors, and route management are just some of the many other features of Yii that you will learn from this book. By the end of this book, you will have a basic CRM application that is all set for service!</p>
Table of Contents (22 chapters)
Web Application Development with Yii 2 and PHP
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Finishing touches


You will need to apply some visual tweaks to your UI to make it appear more clean and appealing.

Creating a new layout to support pages generated by Gii

Here is how our UI looks right now, given that one record is already inserted into the services table:

Given our spartan visuals from Chapter 2, Making a Custom Application with Yii 2, you most probably did not expect much from the UI generated by Gii anyway; however, this obviously has some serious layout problems. The issue is that we jumped too far with this step, as we have not bothered with the looks of our application until now. Chapter 4, The Renderer, talks about rendering a system in Yii 2. However, we can take a glimpse into the future and prepare a bare minimum of the view code to enable the standard Yii 2 project design, as you may have seen in the basic application template already.

Our only issue, really, is the too-limited layout file. Let's recall what our views/layouts/main.php looks like:

<!DOCTYPE html...