denis-kisel/min-assets

There is no license information available for the latest version (v1.2) of this package.

Min assets for laravel

v1.2 2019-10-10 05:00 UTC

This package is auto-updated.

Last update: 2024-05-10 15:04:04 UTC


README

Package for minimize assets for laravel framework

Installation

Via composer

$ composer require denis-kisel/min-assets

Public config

$ php artisan vendor:publish --provider="DenisKisel\\MinAssets\\MinAssetsServiceProvider"

Usage

Set config/min_assets.php config

Run in the bash

$ php artisan min

Output assets like

<!doctype html>
<head>
    @if (config('app.debug'))
            <link href='{{ url('/css/bootstrap.min.css') }}' rel='stylesheet'>
            <link href='{{ url('/css/style.css') . '?v=' . time() }}' rel='stylesheet'>
    @else
        <link href='{{ url('/css/min.css') . '?v=' . filemtime(public_path('css/min.css')) }}' rel='stylesheet'>
    @endif
    
    ...