New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

laravelless/lessphp

Lessphp leafo for Laravel 5
90 3

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 advised

Not 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
Maintainer: h-rafiee

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

langemike/laravel5-less

Bringing lessphp into Laravel

5,934 3
jtgrimes/less4laravel

Bringing lessphp into Laravel

3,364 17
berbecki/laless

Simple LESS compiler for Laravel

1,416 0
zanemiller/less-one

Automatically creates a single .css file from a collection of .less files using...

106 0
maka/less4laravel

jtgrimes/less4laravel package transition leafo/lessphp to oyejorge/less.php

42 0

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