A CakePHP Plugin for sexier admin scaffolding using Twitter Bootstrap.
- Copy the plugin to
app/Plugin/Admin - Enable the plugin in
app/Config/bootstrap.php
CakePlugin::loadAll(array(
'Admin' => array(
'bootstrap' => true
)
));
- Go to
http://example.com/adminwhereexample.comis the URL of your website - The main navigation is built "automagically" from the models in
app/Model - Start administering
In order to control access to Admin actions, the plugin supports a adminIsAuthorized() callback function. Use of the callback is not required and by default, access to all actions is unrestricted.
To use the adminIsAuthorized() callback function:
- Create the
adminIsAuthorized()function inapp/Config/bootstrap.php - return boolean
trueto allow access or booleanfalseto deny access
function adminIsAuthorized()
{
if (the user is authorized) {
return true;
}
return false;
}