1. Go to this page and download the library: Download ahmedebead/cakephp-4-lte 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/ */
ahmedebead / cakephp-4-lte example snippets
// src/Application.php
public function bootstrap()
{
$this->addPlugin('CakephpLte', ['autoload' => true, 'bootstrap' => true, 'routes' => true]);
}
// src/Controller/AppController.php
use Cake\Event\EventInterface;
public function beforeRender(EventInterface $event)
{
$this->viewBuilder()->setTheme('CakephpLte');
$this->viewBuilder()->setClassName('CakephpLte.CakephpLte');
}
// src/View/AppView.php
public function initialize()
{
$this->loadHelper('Form', ['className' => 'CakephpLte.Form']);
$this->loadHelper('Paginator', ['templates' => 'CakephpLte.paginator-templates']);
}