Package Data | |
---|---|
Maintainer Username: | inakianduaga |
Maintainer Contact: | inaki.anduaga@tado.com (Inaki Anduaga) |
Package Create Date: | 2014-11-29 |
Package Last Update: | 2014-12-08 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 15:01:42 |
Package Statistics | |
---|---|
Total Downloads: | 115 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 0 |
Total Forks: | 0 |
Total Open Issues: | 4 |
Extendes Laravel Html builder functionality, providing configuration-based automatic external url redirection to serve assets from CDNs
In your composer.json
file, include
"require": {
"inakianduaga/laravel-html-builder-extensions" : "dev-master",
},
and then run
composer update --no-scripts inakianduaga/laravel-html-builder-extensions
to install the package
After you've updated your composer packages, in app.php
replace the native Laravel Html builder service provider by
the one in this package:
array(
...
'providers' => array(
...
// 'Illuminate\Html\HtmlServiceProvider', //remove this line
'InakiAnduaga\LaravelHtmlBuilderExtensions\LaravelHtmlBuilderExtensionsServiceProvider', //add this one
)
)
In the laravel installation root folder, run
php artisan config:publis inakianduaga/laravel-html-builder-extensions
You can then modify the example values in the file app/config/packages/inakianduaga/laravel-html-builder-extensions/config.php
Configure Assets Redirection (CDNs)
Configure Image lazy loading
@TODO
Usage is the same as the native laravel HTML builder, for example
{{ HTML::image('src', 'alt', options) }}
{{ HTML::styles('src') }}
{{ HTML::scripts('src') }}