How Does A Controller In Yii Work?

How Does A Controller In Yii Work

As we dig in to the Yii Framework further, it seems like an in depth examination of controllers makes a good next step. In this episode we will take a closer look at the generated controller from our advanced installation. Since the code here is a result of what the Yii developers created for the starter template, we can be sure it is created in a best practice sort of way.…

How To Generate Twitter Bootstrap Markup With Yii 2

How To Generate Twitter Bootstrap Markup With Yii 2

Another great feature of the Yii 2 Framework is that it supports Twitter Bootstrap right out of the box. You can use the familiar Yii syntax to generate this markup in your views using Widgets. Widgets in Yii are like little reusable chunks of code that output data in a nice formatted way. Like most things in Yii, they work by loading in a configuration in the form of an array.…

Getting Started With The Yii Application Instance

Getting Started With The Yii Application Instance

A key idea to understand in Yii is that of the application. When we think of the word application, it could mean any number of things. In the Yii sense, it is the object that controls the structure and lifecyle of requests in your website. There are web applications, in addition to console applications, however we’ll be taking a look at the web variety in this episode.…

The Database First Approach of Yii

The Database First Approach of Yii

Each framework has a different selling point so to speak. For example, Laravel has arguably the most clean and intuitive syntax available. Symfony has built a reputation as a standard of sorts. Codeigniter is known for simplicity and speed. The next generation PHP Framework called Phalcon is known for breaking new ground with blazing fast performance via a direct extension to PHP written in C. Yii’s claim to fame is the database first approach.…

How To Install The Advanced Template In Yii2

How To Install The Advanced Template In Yii2

When we first installed the Yii Framework, we found that we were able to create a basic project in one step. We downloaded the repository with composer, and a new skeleton application was created for us all in once shot. This basic application is fantastic for testing out some basic features of Yii. With this basic setup, we get a navigation menu, an about page, a working contact form, as well as a functional login form.…

Custom Domains And Basic Routing In Yii2

Custom Domains And Basic Routing In Yii2

Next up in our Yii Tutorial Series is to look at setting up a basic development environment for working with Yii2 on your local machine. When we originally created the basic application skeleton that Yii provides, we placed it into it’s own folder. In order to access our site, we had to visit something like http://localhost/yii/basic/web/ which is fine, but a bit cumbersome. Instead, we can set up something cool like http://yiirocks.com/

Super Easy CRUD With Gii And The Yii2 Framework

Super Easy CRUD With Gii And The Yii2 Framework

Gii is an incredible piece of software that is part of the Yii Framework. It is a wonderful tool that writes code for you. So many of the development requirements of web applications in PHP include repetitive code, which is why we have these frameworks in the first place. The Gii tool takes it a step further, and creates the code needed to power Create Read Update and Delete functions, new Active Record Models, new Controllers, Forms, Modules, and extensions.…

Connect To A MySQL Database With Yii

Connect To A MySQL Database With Yii

We’re moving along with the wonderful Yii 2 Framework and we’ve learned a bit about Actions, Views, and Forms. With these basic concepts, we’ve been able to create a simple application in our development environment, and it’s a lot of fun. Most applications are going to need a persistance layer at some point, and this is where the database connectivity comes in. Yii has absolutely amazing and powerful tools for working with databases.…