Bootstrap bake templates for CakePHP 3
- Bootstrap templates that use the enhanced FormHelper and some other tools from the alaxos/cakephp3-libs plugin
You can easily install this plugin using composer as follows:
composer require alaxos/cakephp3-bootstrap-theme
After adding the plugin remember to load it in your config/bootstrap.php
file.
The Alaxos
plugin must be loaded as well.
Plugin::load('Alaxos', ['bootstrap' => true]);
Plugin::load('Alaxos/BootstrapTheme');
$ ./bin/cake bake model Users --theme Alaxos/BootstrapTheme
You may use the following functions to load Bootstrap CSS and JS in your template:
<?php
echo $this->AlaxosHtml->includeBootstrapCSS(['block' => false]);
echo $this->AlaxosHtml->includeBootstrapThemeCSS(['block' => false]);
echo $this->AlaxosHtml->includeAlaxosCSS(['block' => false]);
echo $this->AlaxosHtml->includeAlaxosJQuery(['block' => false]);
echo $this->AlaxosHtml->includeAlaxosBootstrapJS(['block' => false]);
?>