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
About the Author
About the Reviewers

Creating the Blog module

By creating the post administration interface, we have now completed the first step of our project. Before generating and implementing our other features, it is important to remember that one additional objective is to easily install blogs on other websites by reusing the same code. For doing that, we will create a blog module, and this is where we should implement our code.

Moving files to the Blog module

The first step is to specify to FuelPHP where to look for modules. At the end of the APPPATH/config/config.php configuration file returned array, add (or uncomment appropriate lines):

'module_paths' => array(

We then need to create our blog module folders. Create a folder located at APPPATH/modules/blog with the following subfolders:

  • classes

  • classes/controller

  • classes/controller/admin

  • classes/model

  • config

  • migrations

  • views

  • views/admin

You can also generate all these folders using the following oil command line:

php oil generate...