PHP code example of fm-labs / cakephp-bootstrap
1. Go to this page and download the library: Download fm-labs/cakephp-bootstrap library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fm-labs / cakephp-bootstrap example snippets
// In Application' bootstrap method, add:
$this->addPlugin('Bootstrap')
// E.g. at the top of your (layout) template file:
$this->loadHelper('Bootstrap.Bootstrap'); // bootstrap 5.x (via CDN)
//$this->loadHelper('Bootstrap.Bootstrap4'); // bootstrap 4.x (via CDN)
//$this->loadHelper('Bootstrap.Bootstrap3'); // bootstrap 3.x (from plugin webroot)
// E.g. in your AppController
class AppController extends \Cake\Controller\Controller {
public function initialize(){
//...
$this->viewBuilder()->loadHelper('Bootstrap.Bootstrap')
}
}