PHPackages                             bandughana/laravel-optimizer - 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. [Caching](/categories/caching)
4. /
5. bandughana/laravel-optimizer

ActiveLibrary[Caching](/categories/caching)

bandughana/laravel-optimizer
============================

Optimizes your Laravel project and makes it ready for deployment

1.0.3(4y ago)3242[1 issues](https://github.com/bandughana/laravel-optimizer/issues)MITPHPPHP ^7.4|^8.0

Since Jan 18Pushed 4y agoCompare

[ Source](https://github.com/bandughana/laravel-optimizer)[ Packagist](https://packagist.org/packages/bandughana/laravel-optimizer)[ Docs](https://github.com/bandughana/laravel-optimizer)[ RSS](/packages/bandughana-laravel-optimizer/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (6)Versions (8)Used By (0)

Laravel Optimizer
=================

[](#laravel-optimizer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9d3cd6761ca828f8dbcbca23e4210fc30b6ba8056040e5aa73cf10dd306ab0c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62616e64756768616e612f6c61726176656c2d6f7074696d697a65722e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/bandughana/laravel-optimizer)[![GitHub license](https://camo.githubusercontent.com/0702478ac3db92d3d5b7230c9a0a3c19f62a8bc942890b3ca3ee7295b5dd54f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f62616e64756768616e612f6c61726176656c2d6f7074696d697a65723f7374796c653d666f722d7468652d6261646765)](https://github.com/bandughana/laravel-optimizer/blob/main/LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/bd9d122ccaf6c37c269f97f7cf79e36d60d41175016a0c49902ba7c54472cb99/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62616e64756768616e612f6c61726176656c2d6f7074696d697a65722e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/bandughana/laravel-optimizer)[![Twitter](https://camo.githubusercontent.com/4d467a3f2be48d39a7c5955bd4a9708c78a8a0131afa4c116c5dde05cfd5bdc7/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c3f636f6c6f723d626c7565267374796c653d666f722d7468652d62616467652675726c3d68747470732533412532462532467061636b61676973742e6f72672532467061636b6167657325324662616e64756768616e612532466c61726176656c2d6f7074696d697a6572)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fpackagist.org%2Fpackages%2Fbandughana%2Flaravel-optimizer)

Laravel Optimizer runs a series of optimizations on your [Laravel](https://laravel.com) project. It helps you optimize your web app before/during deployment and make it faster. The package will help you reduce your website images sizes, run the usual [Laravel deployment](laravel.com/docs/8.x/deployment) commands, minify HTML output, and run further optimizations using PHP Opcache.

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

[](#installation)

You can install the package via composer:

```
composer require bandughana/laravel-optimizer
```

Then, run the following Artisan command to set up the package and publish configurations:

```
php artisan optimizer:install
```

Behind the scenes, this package uses these awesome packages: [Laravel Opcache](https://github.com/appstract/laravel-opcache), [Laravel Image Optimizer](https://github.com/spatie/laravel-image-optimizer), and [Laravel Page Speed](https://github.com/renatomarinho/laravel-page-speed). Configurations for each of the packages will be published to your project's `config` folder after running the above command. For further package-specific configurations, consult the docs for these packages.

Usage
-----

[](#usage)

In the root of your project, you can run optimizations using the Artisan command:

```
php artisan optimizer:run
```

If you set `reversible` to `true` in `config/laravel-optimizer.php` before running the above command, you can reverse the optimizations by running the Artisan command below:

```
php artisan optimizer:revert
```

You can choose to reverse all optimizations, only image optimizations, or only code optimizations by specifying a `--t|type` (`-t` or `--type`) flag with the value of one of the following: \[`all`, `images`, `code`\]. If you don't provide a value to this option, you'll be promted to choose one.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Alhassan Kamil](https://github.com/bandughana)
- [All Contributors](../../contributors)

License
-------

[](#license)

This package uses the MIT License (MIT). Please see [License File](LICENSE.md) for more information.

About Bandughana
----------------

[](#about-bandughana)

Bandughana is a Ghanaian software solutions provider. Our team loves to contribute
to open source.

Proudly made by

[![Bandughana](bandughana.svg)](https://bandughana.com)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~7 days

Total

6

Last Release

1588d ago

Major Versions

0.0.1-alpha → 1.0.02022-01-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24503673?v=4)[Alhassan Kamil](/maintainers/nayi10)[@nayi10](https://github.com/nayi10)

---

Top Contributors

[![nayi10](https://avatars.githubusercontent.com/u/24503673?v=4)](https://github.com/nayi10 "nayi10 (16 commits)")

---

Tags

laravellaravel-packageoptimizerphplaravelcacheoptimizerlaravel-optimizerbandughana

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bandughana-laravel-optimizer/health.svg)

```
[![Health](https://phpackages.com/badges/bandughana-laravel-optimizer/health.svg)](https://phpackages.com/packages/bandughana-laravel-optimizer)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k9.0M69](/packages/spatie-laravel-responsecache)[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

973172.3k2](/packages/awssat-laravel-visits)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

13314.7k](/packages/nexxai-laravel-cfcache)[dragon-code/laravel-cache

An improved interface for working with cache

7046.0k10](/packages/dragon-code-laravel-cache)[omaralalwi/lexi-translate

Laravel translation package with morph relationships and caching.

7413.7k5](/packages/omaralalwi-lexi-translate)

PHPackages © 2026

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