PHPackages                             ivannofick/laravelminifyobfuscate - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ivannofick/laravelminifyobfuscate

ActiveLibrary[Templating &amp; Views](/categories/templating)

ivannofick/laravelminifyobfuscate
=================================

Obfuscate your Blade templates in Laravel by encrypting HTML, CSS, and JS into one HTML file.

v1.0.0(2y ago)43022[1 issues](https://github.com/ivannofick/laravelminifyobfuscate/issues)MITPHPPHP ^7.4.5 || ^8.0

Since Aug 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ivannofick/laravelminifyobfuscate)[ Packagist](https://packagist.org/packages/ivannofick/laravelminifyobfuscate)[ RSS](/packages/ivannofick-laravelminifyobfuscate/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

laravelminifyobfuscate
======================

[](#laravelminifyobfuscate)

[![License](https://camo.githubusercontent.com/7184135ad4eb7f5e35663f997a68853232a51ac79edc053c2e2e8e29ebad7666/687474703a2f2f706f7365722e707567782e6f72672f6976616e6e6f6669636b2f6c61726176656c6d696e6966796f62667573636174652f6c6963656e7365)](https://packagist.org/packages/ivannofick/laravelminifyobfuscate)[![Latest Stable Version](https://camo.githubusercontent.com/17cc5f86f865ef826d5cdf34ab2fe79a311abc16bf1036e627ab27f0fea02321/687474703a2f2f706f7365722e707567782e6f72672f6976616e6e6f6669636b2f6c61726176656c6d696e6966796f62667573636174652f76)](https://packagist.org/packages/ivannofick/laravelminifyobfuscate)[![PHP Version Require](https://camo.githubusercontent.com/2ae4a3679cbabca5d94965215a5095bf31750084d378f991b96d0198bcfbbff9/687474703a2f2f706f7365722e707567782e6f72672f6976616e6e6f6669636b2f6c61726176656c6d696e6966796f62667573636174652f726571756972652f706870)](https://packagist.org/packages/ivannofick/laravelminifyobfuscate)[![Total Downloads](https://camo.githubusercontent.com/a07cb596e50ec737417da235231de67ed3c7d87dc11d96e7fe3c9b29db0443b4/687474703a2f2f706f7365722e707567782e6f72672f6976616e6e6f6669636b2f6c61726176656c6d696e6966796f62667573636174652f646f776e6c6f616473)](https://packagist.org/packages/ivannofick/laravelminifyobfuscate)

Obfuscate your Blade templates in Laravel by encrypting HTML, CSS, and JS into one HTML file
--------------------------------------------------------------------------------------------

[](#obfuscate-your-blade-templates-in-laravel-by-encrypting-html-css-and-js-into-one-html-file)

Laravel Minify Obfuscate [![ReactJs](https://camo.githubusercontent.com/e1726e99da061b24bd1647b7a366ac61ab1fbe18626c887e836294cc421bc43d/68747470733a2f2f7275616e676170702e636f6d2f6173736574732f696d672f6c6f676f732f6c6f676f2d312e737667)](https://camo.githubusercontent.com/e1726e99da061b24bd1647b7a366ac61ab1fbe18626c887e836294cc421bc43d/68747470733a2f2f7275616e676170702e636f6d2f6173736574732f696d672f6c6f676f732f6c6f676f2d312e737667)

Introduction
------------

[](#introduction)

The "Laravel Minify Obfuscate" package allows you to enhance the security of your Laravel Blade templates by obfuscating and encrypting the HTML, CSS, and JavaScript code into a single HTML file. This makes it harder for potential attackers to access and understand your frontend code. The package achieves this by providing middleware that automatically processes the Blade templates and minifies/obfuscates the output.

This README.md file will guide you through the process of setting up and using the package in your Laravel application.

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

[](#installation)

1. Install the package via Composer by running the following command:

```
composer require ivannofick/laravelminifyobfuscate
```

2. After the package is installed, publish the package configuration file and assets using the following Artisan command:

```
php artisan vendor:publish --provider="Ivannofick\Laravelminifyobfuscate\MinifyObfuscateProvider"

```

Middleware Setup
----------------

[](#middleware-setup)

To enable the minification and obfuscation for your Blade templates, you need to add the provided middleware to your application's kernel. Follow these steps:

1. Open the app/Http/Kernel.php file in your Laravel project.
2. Locate the $middleware array and add the following middleware classes:

```
\Ivannofick\Laravelminifyobfuscate\Middleware\MinifyHtml::class,
\Ivannofick\Laravelminifyobfuscate\Middleware\MinifyJavascript::class,

```

The final $middleware array should look something like this:

```
protected $middleware = [
    // Other middleware classes...
    \Ivannofick\Laravelminifyobfuscate\Middleware\MinifyHtml::class,
    \Ivannofick\Laravelminifyobfuscate\Middleware\MinifyJavascript::class,
];

```

3. Save the changes to the Kernel.php file.

### Conditional Obfuscation

[](#conditional-obfuscation)

The "Laravel Minify Obfuscate" package also provides a feature called "laravel\_obfuscate\_conditional," which allows you to enable or disable the obfuscation based on a configuration setting. This can be useful when you want to control whether obfuscation should be active in certain environments or scenarios.

1. To use the `laravel_obfuscate_conditional` feature, follow these steps:
2. Open the config/minifyobfuscate.php configuration file. Find the laravel\_obfuscate\_conditional setting and set it to either true or false as per your requirement:

```
'laravel_obfuscate_conditional' => true,

```

Setting it to `true` will activate the obfuscation, while setting it to false will deactivate it. 3. Save the changes to the configuration file.

Usage
-----

[](#usage)

With the package installed, middleware set up, and conditional obfuscation configured, your Blade templates' obfuscation will be based on the value of the `LARAVEL_OBFUSCATE_SECURE_KEY` setting. If it is set to true, obfuscation will be active, and if it is set to `false`, obfuscation will be disabled.

Please note that this conditional obfuscation setting adds flexibility, allowing you to enable or disable obfuscation as needed for different environments or scenarios.

Conclusion Congratulations! You have successfully set up "Laravel Minify Obfuscate" to protect your Blade templates in Laravel. Your frontend code is now minified and obfuscated, improving the security of your application.

If you encounter any issues or want to contribute to the package, please check out the GitHub repository.

Happy coding!

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1059d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5405e89adb8417bd8808549e7e874766852e51bf842d471f5c877a88adc9db4c?d=identicon)[ivannofick](/maintainers/ivannofick)

---

Top Contributors

[![ivannofick](https://avatars.githubusercontent.com/u/26406777?v=4)](https://github.com/ivannofick "ivannofick (1 commits)")

---

Tags

laravelobfuscatephp8php74js-obfuscateobfuscate using phphtml-obfuscatecss-obfuscate

### Embed Badge

![Health badge](/badges/ivannofick-laravelminifyobfuscate/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9742.3M121](/packages/roots-acorn)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

721160.4k12](/packages/tallstackui-tallstackui)[fahlisaputra/laravel-minify

Minify your blade views, html, css and obfuscate js files on the fly. Lightweight minifier for your Laravel project.

152170.0k1](/packages/fahlisaputra-laravel-minify)

PHPackages © 2026

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