artisan / laravel-asset-pipeline
This package is abandoned and no longer maintained.
The author suggests using the humans/laravel-asset-pipeline package instead.
Asset pipeline library for Laravel.
0.2.0
2019-03-31 21:39 UTC
This package is auto-updated.
Last update: 2020-02-07 23:17:06 UTC
README
This is a Laravel package that provides a pipeline for assets.
Installation
composer require artisan/laravel-asset-pipeline
Configuration
Let's publish the default config so we can transform our assets.
php artisan vendor:publish --tags=asset-pipeline
We'll get a config file in config/laravel-asset-pipeline.php
.
<?php return [ 'path' => resource_path('assets'), 'pipeline' => [ ], ];
The pipes
can take in different formats of callables.
<?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, ], ];