Category: Fuel PHP

  • Routing

    Routing maps request an URI to a specific controller’s method. In this chapter, we will discuss the concept of routing in FuelPHP in detail. Configuration Routes configuration file is located at fuel/app/config/routes.php. The default routes.php file is defined as follows − Here, _root_ is the predefined default route, which will be matched when the application is requested with root path, / e.g. http://localhost:8080/.…

  • Controllers

    Controllers are responsible for handling each request that comes into FuelPHP application. According to FuelPHP, controllers are located at fuel/app/classes/controller/. Let’s first create an Employee Controller. employee.php Controller Methods Controllers process a web request by using one of its action_ methods. We can create as many action_ methods depending on the requirement of the application. The default action_ method is action_index. action_index method can be…

  • Configuration

    In this chapter, we will understand how to configure a FuelPHP application. By default, configuration files are stored inside the fuel/app/config folder. The application’s main configuration is fuel/app/config/config.php. The configuration is specified using PHP’s associated array. Overview By default, all default configuration files are defined in fuel/core/config folder. To override a default configuration, add the corresponding key in the /fuel/app/config/config.php file and…

  • Simple Web Application

    In this chapter, we will see how to create a simple application in FuelPHP framework. As discussed earlier, you know how to create a new project in Fuel. We can take an example of Employee details. Let’s start by creating a project named Employee using the following command. After executing the command, an employee project is created…

  • Architecture Overview

    FuelPHP is based on battle tested Model-View-Controller architecture along with HMVC (Hierarchical MVC) support. While MVC provides flexible and layered application development, HMVC goes one step further to enable widgetization of the web application. The strength of FuelPHP is that it does not enforce specific ways to develop an application. It just provides a simple and easy-to-use standard structure.…

  • Installation

    This chapter explains how to install FuelPHP framework on your machine. FuelPHP installation is very simple and easy. You have two methods to create FuelPHP applications − Let’s go through each of the methods one by one in detail in the subsequent sections. System Requirements Before moving to installation, the following system requirements have to…

  • Introduction

    FuelPHP is an open source web application framework. It is written in PHP 5.3 and implements HMVC pattern. HMVC is Hierarchical Model-View-Controller framework that allows to sub-request the controller, which returns the partial page such as comments, menus, etc., instead of the complete page as in normal MVC. FuelPHP is created with a desire to incorporate best practices from…