Book Image

Learning FuelPHP for Effective PHP Development

By : Ross Tweedie
Book Image

Learning FuelPHP for Effective PHP Development

By: Ross Tweedie

Overview of this book

<p>PHP frameworks have been around for a number of years. FuelPHP was one of the first frameworks built for PHP 5.3. It makes use of more advanced features of the language to allow you to focus on delivering features and code for your projects. FuelPHP allows you to quickly build prototypes using scaffolding and command-line tools, thus allowing you to concentrate on the fun part of trialling ideas and concepts.</p> <p>This practical guide will show you how to use FuelPHP to quickly create projects more quickly and effectively. You will learn everything you need to know when creating projects with FuelPHP, including how to adapt the project as ideas change and develop.</p> <p>This guide is packed with several tutorials that will help you to build a powerful and engaging application, and in the process you will learn more about FuelPHP. This book explores how to install and build a FuelPHP project in a step- by- step approach.</p> <p>Starting with an exploration of the features of FuelPHP, this book then delves into the creation of a simple application. You will then move on to scaffolding your application using the powerful FuelPHP Oil command-line tool. Next, you will be introduced to packages and modules, and also cover routing, which allows for cleaner URL structures.</p> <p>The book concludes with an introduction to the PHP community.</p>
Table of Contents (14 chapters)

Migrations and Oil


When quickly creating projects and getting the bare bones together, the FuelPHP Oil tool can handle some of the more repetitive tasks for you, allowing you to concentrate on other aspects of the project. This ranges from setting up the database tables (as demonstrated before) to creating models and controllers. The FuelPHP Oil tool can also be used to scaffold an administration system that is ready to be used to administer contents with a full user-authentication system. It'll provide the starting point; although the results won't always be pretty, it will be functional.

This allows you to test ideas quickly and iterate towards the perfect code. We'll run through the individual features of Oil to create models, controllers, and database migrations. This will give us more time to tweak and create a more polished project/journal.

One of the most useful features of Oil is the ability to migrate the database structure. These can be used to ensure the consistency between environments...