CakePHP + Bootstrap


I love PHP. That’s a fact that I managed to prove ever since college. I self studied the language as well as the underlying platform due to my interest in learning; which comes from the fact that I know its purpose.  For this post, I’m going to put some perspective on how do we create a CakePHP application and put the bootstrap in to make a more responsive user interface design for the web.

Step 1: Ready your Cake App – skip this if you already done some baking – if you want to get something going from scratch, follow my simple registration tutorial here: Registration Example

Step 2: Download BootStrap for CakePHP

Since the birth of boostrap a lot of developers created their own mix and match using the front-end framework. Either you download an existing one or create your own. For this tutorial, lets download an existing one: CakePHP Theme

Extract the zip and put it in your Theme directory inside your cakePHP project.

PHP_-_gasfinder_app_Controller_AppController.php_-_Eclipse_-__Users_alvinreyes_EclipseProjects_PHP

Step 3: Set the $theme on your cakePHP AppController.php

cakestrap_snap

We basically need to set up the global variable $theme and put the folder name of the bootstrap to use it.

Sample Output: Not perfect but it will give you a good start on the layout. You can now focus on the business logic and just take care of the UI later.Administrator

 

One thought on “CakePHP + Bootstrap

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s