humans/laravel-asset-pipeline

This package is abandoned and no longer maintained. No replacement package was suggested.

Asset pipeline library for Laravel.

1.0.3 2020-04-06 05:49 UTC

This package is auto-updated.

Last update: 2020-06-29 22:20:27 UTC


README

This is a Laravel package that provides a pipeline for assets.

Installation

composer require humans/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,
    ],
];