Book Image

FuelPHP Application Development Blueprints

By : Sebastien Drouyer
Book Image

FuelPHP Application Development Blueprints

By: Sebastien Drouyer

Overview of this book

Table of Contents (13 chapters)
FuelPHP Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Generating the sample application


In order to test our packages, we will create a simple application that will handle dummy items. Just to be perfectly clear, we are not interested here by the ultimate goal of the application; this is just a test application. Most of the work will be done inside the packages. The user interface and the model will therefore be very simple and will be fully generated by the scaffold command of the oil utility. The packages will later be connected to the creation and edition features to determine whether or not the visitor is human.

First, generate the scaffold using the following command:

php oil generate scaffold/crud item name:string

It will print the following output:

Creating migration: APPPATH/migrations/001_create_items.php
Creating model: APPPATH/classes/model/item.php
Creating controller: APPPATH/classes/controller/item.php
Creating view: APPPATH/views/item/index.php
Creating view: APPPATH/views/item/view.php
Creating view: APPPATH/views/item/create...