Prefixes are additional values prepended to the URL, which allow you to clearly separate collections of actions in your controllers. This is typically used to rapidly create an admin area for an application.
In this recipe, we'll create an inventory management area to a
books controller, where the standard actions will simply display details of books and the inventory area will be used to manage our books.
For this recipe, we'll need a table for our books, so create a table named
books by using the following SQL statement:
CREATE TABLE books ( id VARCHAR(36) NOT NULL, name VARCHAR(100), stock INT(4), created DATETIME, modified DATETIME, PRIMARY KEY(id) );
We'll then need some sample data, so run the following SQL statement ...