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.
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( APPPATH.'modules'.DS ),
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...