Skip to content
wilburhimself edited this page Mar 29, 2011 · 2 revisions

Routes in the Fastbreak framework work out of the box with the common convention of:

:controller/:action/:params

But this default routes can be overriding adding an elements to the $routes array in the routes.php file in the root path of your project.

The custom routes should be written as follows, for example, if you want to call your about/index as /about, you should add

'about' => 'about/index',

to the $routes array in the routes.php file.

Additionally you can define a default controller to be called when there are no parameter in the URL. For example if you want the About controller to be the default controller you can write:

define('DEFAULT_CONTROLLER', 'About');

in this same file.

Clone this wiki locally