Ensure require is present in composer.json
.
This will install the plugin into Plugin/BoostCake
:
{ "require": { "slywalker/boost_cake": "*" } }
You need to enable the plugin your app/Config/bootstrap.php file:
CakePlugin::load('BoostCake');
If you are already using CakePlugin::loadAll();
, then this is not necessary.
You need to add helpers at controller.
<?php class AppController extends Controller { public $helpers = array( 'Session', 'Html' => array('className' => 'BoostCake.BoostCakeHtml'), 'Form' => array('className' => 'BoostCake.BoostCakeForm'), 'Paginator' => array('className' => 'BoostCake.BoostCakePaginator'), ); }
Substitute alert-error with alert-danger if Bootstrap 3.
<?php class AppController extends Controller { public $components = array( 'Auth' => array( 'flash' => array( 'element' => 'alert', 'key' => 'auth', 'params' => array( 'plugin' => 'BoostCake', 'class' => 'alert-error' ) ) ) ); }