PHP code example of kimcastle / laravel5-lessphp

1. Go to this page and download the library: Download kimcastle/laravel5-lessphp 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/ */

    

kimcastle / laravel5-lessphp example snippets


'providers' => [
    "Kimcastle\Laravel5Less\LessServiceProvider::class"
];

'Less' => Kimcastle\Laravel5Less\Facades\Less::class

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);
     }
}