PHPackages                             saeedvir/laravel-assets-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. saeedvir/laravel-assets-optimizer

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

saeedvir/laravel-assets-optimizer
=================================

Merge css and javascripts files and optimize them in laravel projects without node js

218PHP

Since Jan 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/saeedvir/laravel-assets-optimizer)[ Packagist](https://packagist.org/packages/saeedvir/laravel-assets-optimizer)[ RSS](/packages/saeedvir-laravel-assets-optimizer/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

laravel-assets-optimizer
========================

[](#laravel-assets-optimizer)

This package is used to manage css and javascript files in Laravel projects. You can combine them together without using node js. You can also optimize the created files.

توضیحات فارسی
-------------

[](#توضیحات-فارسی)

با استفاده از این پکیج می توانید فایل های css و Javascript را با هم ترکیب کنید. این کار در افزایش سرعت بارگزاری صفحات تاثیر زیادی دارد.

در این روش نیازی به استفاده و نصب node js نیست.

البته استفاده از روش زیر در لاراول توصیه میشود [laravel webpack](https://laravel.com/docs/5.7/mix)

Notice
------

[](#notice)

Note that this package is in development and may have a lot of bugs at first

### How to install ?

[](#how-to-install-)

```
composer require saeedvir/laravel-assets-optimizer
```

```
php artisan vendor:publish --provider="LaravelAssetsOptimizer\LaravelAssetsOptimizerServiceProvider"
```

### How to use ?

[](#how-to-use-)

edit 'config/assets.php

```
return [
    'base_path'=>'public/',
    'profiles'=>[
        'frontend'=>[
            'css_files'=>[

                //'assets/vendor/bootstrap3/bootstrap.rtl.full.css', //Bootstrap 3

                // 'assets/vendor/bootstrap4/litera-theme/bootstrap.css', //Bootstrap 4
                // 'assets/vendor/bootstrap4/bootstrap-rtl.css', //Bootstrap 4

                // 'assets/vendor/fontawesome/4.7/css/font-awesome.css', //fontawesome 4.7

                // 'assets/vendor/fontawesome/5.0/css/all.css', //fontawesome 5.0
                // 'assets/vendor/fontawesome/5.0/css/v4-shims.css', //fontawesome 5.0

                // 'assets/vendor/slick/slick.css',
                // 'assets/vendor/slick/slick-theme.css',

                // 'assets/vendor/jquery-ui/jquery-ui.min.css',

                // 'assets/css/fonts.css',
                // 'assets/css/custom.css',
                // 'assets/css/responsive.css',
            ],
            'js_files'=>[

                // 'assets/vendor/jquery/jquery-3.3.1.min.js', //Jquery 3
                //'assets/vendor/jquery/jquery-3.3.1.slim.min.js', //Jquery 3 Slim (No Ajax And Effects)

                // 'assets/vendor/jquery/jquery-migrate-1.4.1.min.js', //Jquery 1+ migrate

                // 'assets/vendor/jquery/jquery-migrate-3.0.0.min.js', //Jquery 3+ migrate

                // 'assets/vendor/jquery-ui/jquery-ui.min.js',
                // 'assets/js/custom.js',

            ],
            'skip_css_complie'=>[
                //'assets/css/fonts.css'
            ],
            'skip_js_complie'=>[
            ],
            'css_compile_path'=>'css/',
            'css_compile_name'=>'frontend.css',
            'js_compile_path'=>'js/',
            'js_compile_name'=>'frontend.js',
            'add_filename_title'=>true,
            'minify_css'=>true,
            'optimize_css'=>true,
            'minify_js'=>true,
        ],//end frontend
        'backend'=>[
            'css_files'=>[
                // 'panel/vendors/iconfonts/mdi/css/materialdesignicons.min.css',
                // 'panel/vendors/css/vendor.bundle.base.css',
                // 'panel/css/custom.css',
            ],
            'js_files'=>[
                // 'panel/vendors/js/vendor.bundle.base.js',
                // 'panel/vendors/js/vendor.bundle.addons.js',
                // 'panel/js/off-canvas.js',
            ],
            'skip_css_complie'=>[
            ],
            'skip_js_complie'=>[
            ],
            'css_compile_path'=>'css/',
            'css_compile_name'=>'backend.css',
            'js_compile_path'=>'js/',
            'js_compile_name'=>'backend.js',
            'add_filename_title'=>true,
            'minify_css'=>true,
            'optimize_css'=>true,
            'minify_js'=>true,
        ],
        //Other Profiles ...

    ]
];
```

then

```
php artisan assets:optimize
```

For Help :

```
php artisan assets:optimize help
```

ToDO List
---------

[](#todo-list)

- add javascript obfuscator
- add html minify

Other Packages
--------------

[](#other-packages)

- [Laravel Project Ghost](https://github.com/saeedvir/projectGhost)
- [Laravel Mysql Backup](https://github.com/saeedvir/laravel-mysql-backup)

Security
--------

[](#security)

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

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb63dbbcce86ecd5af69b654e2d4a30ec7b9a7e19985accc6510413e04627cb2?d=identicon)[saeedvir](/maintainers/saeedvir)

---

Top Contributors

[![saeedvir](https://avatars.githubusercontent.com/u/8615309?v=4)](https://github.com/saeedvir "saeedvir (12 commits)")

---

Tags

assetscsscss-tooljavascript-fileslaravellaravel-5-packagelaravel-assets-optimizerphp

### Embed Badge

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

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

###  Alternatives

[gloudemans/shoppingcart

Laravel Shoppingcart

3.7k756.7k12](/packages/gloudemans-shoppingcart)[erag/laravel-pwa

A simple and easy-to-use PWA (Progressive Web App) package for Laravel applications.

16083.3k](/packages/erag-laravel-pwa)[datatables.net/datatables.net-dt

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is DataTables with styling for \[DataTables\](https://datatables.net/)

1835.1k15](/packages/datatablesnet-datatablesnet-dt)[shel/neos-workspace-module

An alternative workspace module with additional features for Neos CMS

1738.6k1](/packages/shel-neos-workspace-module)

PHPackages © 2026

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