| Package Data | |
|---|---|
| Maintainer Username: | haubar |
| Maintainer Contact: | haubarclack@gmail.com (haubar) |
| Package Create Date: | 2015-01-22 |
| Package Last Update: | 2015-01-23 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-03 15:14:12 |
| Package Statistics | |
|---|---|
| Total Downloads: | 6 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
#Auto Asset for laravel
加入
"repositories": [ { "type": "git", "url": "https://github.com/haubar/autoasset.git" } ],
在`composer.json`下指令
composer require kerkerker/autoasset
在 app/config/app.php 裡的 Providers 裡加入
'Kerkerker\Autoasset\AssetServiceProvider'
在 app/config/app.php 裡的 aliases 裡加入
'Asset' => 'Kerkerker\Autoasset\Asset'
在要使用的blade樣版中使加入
`{{ Asset::style('') }}`
`{{ Asset::script('') }}`
會自動加入網址對應檔案的CSS 及 javascript
example:
`http://laravel.local/register`
`<link media="all" type="text/css" rel="stylesheet" href="http://laravel.local/register.css">`
config 可另外加入path參數