O'Reilly logo

FuelPHP Application Development Blueprints by Sébastien Drouyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scaffolding the posts

We will now, as we did in Chapter 1, Building Your First FuelPHP Application and Chapter 2, Building a To-do List Application, generate the necessary code to handle our posts. Since posts should only be created and edited by authenticated administrators in an administration panel, we will generate the scaffold using admin (alias admin/orm):

php oil generate admin post title:string slug:string small_description:string[200] content:text category_id:int user_id:int

The command should output the following:

Creating controller: APPPATH/classes/controller/base.php
Creating controller: APPPATH/classes/controller/admin.php
Creating views: APPPATH/views/admin/template.php
Creating views: APPPATH/views/admin/dashboard.php
Creating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required