maherelgamil / cachebusting
laravel 4中修改文件版本时简单实用的工具。
dev-master
2015-01-23 08:52 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
This package is auto-updated.
Last update: 2024-09-29 03:52:29 UTC
README
laravel 4中修改文件版本时简单实用的工具。
安装
Composer
将Laravel Cachebusting添加到您的composer.json
文件中。
"maherelgamil/cachebusting": "dev-master"
运行composer install
以获取最新版本的包。
手动
建议使用Composer,但您也可以从该仓库下载并安装。
Laravel 4
Cachebusting附带Laravel 4的服务提供器。您需要按照上述步骤将其添加到composer.json
中,然后将其注册到您的应用程序中。
打开app/config/app.php
并找到providers
键。将Cachebusting\CachebustingServiceProvider
添加到数组中。
... 'Maherelgamil\Cachebusting\CachebustingServiceProvider' ...
您还可以在同一个app.php中添加一个别名到类别名列表中
... 'Bust' => 'Maherelgamil\Cachebusting\Facades\Cachebusting' ...
用法
<link rel="stylesheet" type="text/css" href="{{ Bust::url('css/style.css') }}" />
许可证
Cachebusting是一个开源的laravel包,使用MIT许可证授权。