Chapter 7: Improving the Dashboard
220
When you ’ re all done, your dashboard home page should look like Figure 7 - 13. Note the changes in the
global navigation along the top, too.
Figure 7-13
Creating Admin Screens for Sizes
Because the Sizes table is practically identical to the Colors table, you ’ re going to be able to save a great
deal of time in this section. All you have to do is copy the controller, model, and three view files you
used for colors and repurpose them for sizes. Practically all you have to do is change out sizes for colors
within the code, and you ’ ve got another working admin section.
For example, here is the admin/sizes controller. Please note that it is precisely identical in structure to
the admin/colors controller, except it uses the sizes nomenclature for redirects, labeling, and model
functions:
< ?php
class Sizes extends Controller {
function Sizes(){
parent::Controller();