artisan / laravel-asset-pipeline
0.2.0
2019-03-31 21:39 UTC
This package is auto-updated.
Last update: 2020-02-07 23:17:06 UTC
README
这是一个提供资产管道的 Laravel 包。
安装
composer require artisan/laravel-asset-pipeline
配置
让我们发布默认配置,以便我们可以转换我们的资产。
php artisan vendor:publish --tags=asset-pipeline
我们将在 config/laravel-asset-pipeline.php
中得到一个配置文件。
<?php return [ 'path' => resource_path('assets'), 'pipeline' => [ ], ];
《管道》可以接受不同格式的可调用形式。
<?php return [ 'pipeline' => [ // For quick or small manpulations! function ($request, $asset) { return $asset; }, // I won't particularly use this but it's there! [$object, 'method'], // This needs to have a `handle($request, $asset)` method. SomeClass::class, ], ];