PHP code example of songphi / cakephp-less

1. Go to this page and download the library: Download songphi/cakephp-less 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/ */

    

songphi / cakephp-less example snippets


CakePlugin::load('CakeLess');

CakePlugin::loadAll();

public $helpers = array('CakeLess.Less');

echo $this->Less->css('yourfile');

echo $this->Less->css('yourfile',array('plugin' => 'PluginFolderName'));
	
echo $this->Less->css(array(
		'bootstrap/bootstrap',
		'prettify',
	)
);
json
"mposer/installers": "*",
	"songphi/cakephp-less": "dev-master",
	"oyejorge/less.php": "~1.7"
},
"extra": {
	"installer-paths": {
		"app/Plugin/{$name}/": ["songphi/cakephp-less"]
	}
}