laravelless/lessphp
Larablocks Analysis
laravelless/lessphp works with any PHP project: the latest release (1.0.3, Jun 16, 2018) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Jun 16, 2018)
- 0 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jun 16, 2018.
- No releases in the last 12 months.
- First released: Jun 23, 2016.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.
| Install | |
|---|---|
composer require laravelless/lessphp |
|
| Latest Version: | 1.0.3 |
| License: | MIT |
| Last Updated: | Jun 16, 2018 |
| Links: | GitHub · Packagist |
LESS For Laravel 5.x Without Node.js
LESS with your Laravel. Using Leafo.php
Features
- Can modify LESS variables on-the-fly
- Can parse custom CSS/LESS and append it to the resulting file
- Caching support
Installation
You need composer to install.
$ composer require laravelless/lessphp
Add Provider,Facade to config/app.php
'providers' => [
...,
Laravelless\Lessphp\LessphpServiceProvider::class,
];
/**********/
'aliases' => [
...,
'Lessphp' => Laravelless\Lessphp\LessphpFacade::class,
];
After that you need publish vendor.
$ php artisan vendor:publish
Now you must have config/Lessphp.php so you can edit that where is your LESS path and your file must be excute to CSS
return array(
'css_path' => base_path('css'),
'less_path' => base_path('less'),
'cache_extension' => '.cache',
'formatter' => "compressed",
);
Functions
For execute to css is simple :
$filename = 'style.less';
$less = \Lessphp::compile($filename);
NOTE : Lessphp return url("css/$filename.css") Will be fixed soon to dynamical path.
For execute cached less => css
$filename = 'style.less';
$less = \Lessphp::cacheCompile($filename);
NOTE : You can set output filename for cacheCompile as second parameter.
$less = \Lessphp::cacheCompile($filename,'style-min');
You can set variables before compile like this :
$data = [
'myBorderRadius'=>'5px',
];
$less = \Lessphp::setVariables($data)->compile($filename);
License
HRAFIEE
IT's Free , SO Enjoy your free World
Related Packages
Automatically creates a single .css file from a collection of .less files using...
Version History
| Version | Released | License |
|---|---|---|
| 1.0.3 | MIT | |
| 1.0.2 | MIT | |
| 1.0.1 | MIT | |
| 1.0 | HRAFIEE | |
| 0.9 | HRAFIEE |
Pre-releases (2)
| Version | Released | License |
|---|---|---|
| 1.0b | HRAFIEE | |
| 0.9b | HRAFIEE |