kimcastle/laravel5-lessphp
laravel5-lessphp
lessphp is a compiler for LESS by PHP
(1) First, pull in the package through Composer.
"require": {
"kimcastle/laravel5-lessphp": "1.0.0"
}
(2) And then, if using Laravel 5, include the service provider within config/app.php.
'providers' => [
"Kimcastle\Laravel5Less\LessServiceProvider::class"
];
In the aliases section, add:
'Less' => Kimcastle\Laravel5Less\Facades\Less::class
(3) Uage
Within your models or controllers, you can perform modification to the outputted CSS. Here are some examples:
use Kimcastle\Laravel5Less\Facades\Less;
class TestController extend Controller
{
public function less()
{
Less::modifyVars(['@externalBgColor' => 'red'])->compile('less_test');
Less::modifyVars(['@externalBgColor' => '#ff0001'])->url('less_test', true);
}
}
Related Packages
valorin/random
Random is a simple helper package designed to make it easy to generate a range o...
413,065
233
cline/struct
Lean, attribute-driven Laravel data objects with explicit validation and Eloquen...
17,788
0
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 1.1.3 | >=5.5.0 | MIT | |
| 1.1.2 | >=5.5.0 | MIT | |
| 1.0.0 | >=5.5.0 | MIT | |
| 0.1.0 | >=5.5.0 | MIT |