PHP code example of barelab / cakephp-adminlte-theme
1. Go to this page and download the library: Download barelab/cakephp-adminlte-theme 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/ */
barelab / cakephp-adminlte-theme example snippets
// src/Application.php
public function bootstrap()
{
$this->addPlugin('AdminLTE');
}
// src/Controller/AppController.php
public function beforeRender(Event $event)
{
$this->viewBuilder()->setTheme('AdminLTE');
// Before of CakePHP 3.5
$this->viewBuilder()->theme('AdminLTE');
}
// src/View/AppView.php
public function initialize()
{
$this->loadHelper('Form', ['className' => 'AdminLTE.Form']);
}