PHPackages                             oriceon/minify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. oriceon/minify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

oriceon/minify
==============

A package for minifying styles and javascript for laravel 6+

2.0.1(1y ago)2327MITPHPPHP &gt;=7.2

Since Feb 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/oriceon/minify)[ Packagist](https://packagist.org/packages/oriceon/minify)[ RSS](/packages/oriceon-minify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

Minify
======

[](#minify)

[![Build Status](https://camo.githubusercontent.com/c06b64eb95db7d4db6c58ae52e52f5b26845232524d66966401f08f0ce631554/68747470733a2f2f7472617669732d63692e6f72672f6f726963656f6e2f6d696e6966792e737667)](https://travis-ci.org/oriceon/minify)[![Latest Stable Version](https://camo.githubusercontent.com/e527027e6aa1d2ce3e643ac87463d2bdb0fd1ae042c7881964cd8352d9a0b440/68747470733a2f2f706f7365722e707567782e6f72672f6f726963656f6e2f6d696e6966792f762f737461626c652e737667)](https://packagist.org/packages/oriceon/minify)[![Total Downloads](https://camo.githubusercontent.com/e331c47ccc9987c5519491a1626f7a21a4e18b3027465021daea6a42cf44f156/68747470733a2f2f706f7365722e707567782e6f72672f6f726963656f6e2f6d696e6966792f646f776e6c6f6164732e737667)](https://packagist.org/packages/oriceon/minify)[![License](https://camo.githubusercontent.com/59526284ac673d370b49eba740c47889c667c7fd49d071f87e9124a6ef7c30f2/68747470733a2f2f706f7365722e707567782e6f72672f6f726963656f6e2f6d696e6966792f6c6963656e73652e737667)](https://packagist.org/packages/oriceon/minify)

With this package you can minify your existing stylessheet and javascript files for laravel 6+. This process can be a little tough, this package simplies this process and automates it.

Installation
------------

[](#installation)

Begin by installing this package through Composer.

`composer require oriceon/minify`

Publish the config file:

`php artisan vendor:publish --provider="Oriceon\Minify\MinifyServiceProvider" --force`

Package will auto-discover and you can use this Facade anywhere in your application

#### Stylesheet

[](#stylesheet)

```
	// app/views/hello.blade.php

			...
			{!! Minify::stylesheet('/css/main.css') !!}

			// or by passing multiple files
			{!! Minify::stylesheet(array('/css/main.css', '/css/bootstrap.css')) !!}

			// add custom attributes
			{!! Minify::stylesheet(array('/css/main.css', '/css/bootstrap.css'), array('foo' => 'bar')) !!}

			// add full uri of the resource
			{!! Minify::stylesheet(array('/css/main.css', '/css/bootstrap.css'))->withFullUrl() !!}
		    {!! Minify::stylesheet(array('//fonts.googleapis.com/css?family=Roboto')) !!}

			// minify and combine all stylesheet files in given folder
			{!! Minify::stylesheetDir('/css/') !!}

			// add custom attributes to minify and combine all stylesheet files in given folder
			{!! Minify::stylesheetDir('/css/', array('foo' => 'bar', 'defer' => true)) !!}

			// minify and combine all stylesheet files in given folder with full uri
			{!! Minify::stylesheetDir('/css/')->withFullUrl() !!}

		...

```

#### Javascript

[](#javascript)

```
	// app/views/hello.blade.php

		...

		{!! Minify::javascript('/js/jquery.js') !!}

		// or by passing multiple files
		{!! Minify::javascript(array('/js/jquery.js', '/js/jquery-ui.js')) !!}

		// add custom attributes
		{!! Minify::javascript(array('/js/jquery.js', '/js/jquery-ui.js'), array('bar' => 'baz')) !!}

		// add full uri of the resource
		{!! Minify::javascript(array('/js/jquery.js', '/js/jquery-ui.js'))->withFullUrl() !!}
        {!! Minify::javascript(array('//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js')) !!}

		// minify and combine all javascript files in given folder
		{!! Minify::javascriptDir('/js/') !!}

		// add custom attributes to minify and combine all javascript files in given folder
		{!! Minify::javascriptDir('/js/', array('bar' => 'baz', 'async' => true)) !!}

		// minify and combine all javascript files in given folder with full uri
		{!! Minify::javascriptDir('/js/')->withFullUrl() !!}

```

Credits to main author
======================

[](#credits-to-main-author)

Fwork package : [DevFactoryCH/minify](https://github.com/DevFactoryCH/minify)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance43

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~243 days

Total

4

Last Release

448d ago

Major Versions

1.2 → 2.0.02024-03-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a9692bf91992f959404944cecec65e1b68b21491ec3c5642e67e47a836d9ea8?d=identicon)[oriceon](/maintainers/oriceon)

---

Top Contributors

[![oriceon](https://avatars.githubusercontent.com/u/358823?v=4)](https://github.com/oriceon "oriceon (13 commits)")

---

Tags

laravelminify

### Embed Badge

![Health badge](/badges/oriceon-minify/health.svg)

```
[![Health](https://phpackages.com/badges/oriceon-minify/health.svg)](https://phpackages.com/packages/oriceon-minify)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k33.8M339](/packages/yajra-laravel-datatables-oracle)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k5.4k1](/packages/vinkius-labs-laravel-page-speed)[devfactory/minify

A package for minifying styles and javascript for laravel 5

87363.5k14](/packages/devfactory-minify)[genealabs/laravel-changelog

A Laravel Nova tool.

55250.7k](/packages/genealabs-laravel-changelog)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
