定制 inakianduaga/laravel-html-builder-extensions 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inakianduaga/laravel-html-builder-extensions

Composer 安装命令:

composer require inakianduaga/laravel-html-builder-extensions

包简介

Extendes Laravel Html builder functionality

关键字:

README 文档

README

Extendes Laravel Html builder functionality, providing configuration-based automatic external url redirection to serve assets from CDNs

Installation

Add package as a composer dependency

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

Register package in the laravel application

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

Publish package configuration

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)

  • Script, styles and images can be redirected through an external url individually, see configuration
  • Image redirection is enabled by file extension, so you can skip redirecting certain images

Configure Image lazy loading

@TODO

Usage:

Usage is the same as the native laravel HTML builder, for example

{{ HTML::image('src', 'alt', options) }}
{{ HTML::styles('src') }}
{{ HTML::scripts('src') }}

统计信息

  • 总下载量: 115
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-29