PHPackages                             langemike/laravel5-less - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. langemike/laravel5-less

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

langemike/laravel5-less
=======================

Bringing lessphp into Laravel

1.2(3mo ago)35.9k↓100%4[1 issues](https://github.com/langemike/laravel5-less/issues)[1 PRs](https://github.com/langemike/laravel5-less/pulls)MITPHPPHP &gt;=5.5.0

Since Oct 10Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/langemike/laravel5-less)[ Packagist](https://packagist.org/packages/langemike/laravel5-less)[ RSS](/packages/langemike-laravel5-less/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

LESS support for Laravel 5.x without Node.js
============================================

[](#less-support-for-laravel-5x-without-nodejs)

Use LESS with your Laravel installation. Uses [oyejorge/less.php](http://lessphp.gpeasy.com/) instead of [leafo/lessphp](http://leafo.net/lessphp/) which is a more actively developed port of the official LESS processor.

Features
--------

[](#features)

- Can modify LESS variables on-the-fly
- Can parse custom CSS/LESS and append it to the resulting file
- Works with Twitter Bootstrap v3.3.5 (thanks to oyejorge/less.php)
- Caching support

Installation
------------

[](#installation)

First, pull in the package through Composer.

```
"require": {
    "langemike/laravel5-less": "~1.0"
}
```

Note: The following installation instructions are longer required with Laravel 5.5.

If using Laravel 5 up to 5.4, include the service provider within `config/app.php`.

```
'providers' => [
    'Langemike\Laravel5Less\LessServiceProvider'
];
```

In the aliases section, add:

```
'aliases' => [
    'Less' => 'Langemike\Laravel5Less\LessFacade'
];
```

Configuration
-------------

[](#configuration)

In order to work with the configuration file, you're best off publishing a copy with Artisan:

```
$ php artisan vendor:publish

```

This will create a config file 'less.php' in your config directory.

### Settings

[](#settings)

You can specify your configuration through 3 options: `.env`, `config.php` file and through `$options` parameter.

Your .env configuration will be used by default, it will be overridden by it's config.php settings, but the $options parameter will have the highest preference.

### Recompilation

[](#recompilation)

Additionally you can (and probably should) have different configurations for development and production. Specifically, you probably don't want to be generating css files on your production server, since it will slow down your site.

- change -- Check if LESS file(s) are modified. If it does, recompile CSS
- none -- Don't check, don't recompile.
- always -- Always rewrite CSS

Usage
-----

[](#usage)

Within your models or controllers, you can perform modification to the outputted CSS. Here are some examples: before you perform a redirect...

```
public function recompileCSS()
{
    Less::modifyVars(['@body-bg' => 'pink'])->recompile('filename');

    return Redirect::back();
}
```

Within your view you can use the `Less::url()` function to link to your generated CSS

```

```

Passing `true` as the second parameter to `Less::url()` will auto-detect, based on your configuration, if recompilation is needed and will do so accordingly.

Credits
-------

[](#credits)

This project is inspired by [Less4Laravel](https://github.com/jtgrimes/less4laravel). Without the hard work of [oyejorge/less.php](http://lessphp.gpeasy.com/) this project wouldn't be possible.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance73

Regular maintenance activity

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 80.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1878 days

Total

3

Last Release

109d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7bc72b60c1823a05be9131e451be42775b95f5a2d13b207afff39841212c049f?d=identicon)[langemike](/maintainers/langemike)

---

Top Contributors

[![langemike](https://avatars.githubusercontent.com/u/1019129?v=4)](https://github.com/langemike "langemike (21 commits)")[![bartvandiepen1](https://avatars.githubusercontent.com/u/83601284?v=4)](https://github.com/bartvandiepen1 "bartvandiepen1 (3 commits)")[![AdamReece-WebBox](https://avatars.githubusercontent.com/u/16222407?v=4)](https://github.com/AdamReece-WebBox "AdamReece-WebBox (2 commits)")

---

Tags

laravelless

### Embed Badge

![Health badge](/badges/langemike-laravel5-less/health.svg)

```
[![Health](https://phpackages.com/badges/langemike-laravel5-less/health.svg)](https://phpackages.com/packages/langemike-laravel5-less)
```

###  Alternatives

[nizsheanez/yii2-asset-converter

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

64167.5k6](/packages/nizsheanez-yii2-asset-converter)[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)[zizaco/lessy

Lessy is a simple and lean LESS compiler for Laravel

2316.7k](/packages/zizaco-lessy)[jtgrimes/less4laravel

Bringing lessphp into Laravel

193.4k](/packages/jtgrimes-less4laravel)[mmanos/laravel-casset

An asset management package for Laravel 4.

112.6k](/packages/mmanos-laravel-casset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
