PHPackages                             hadiabedzadeh/static-assets - 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. hadiabedzadeh/static-assets

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

hadiabedzadeh/static-assets
===========================

Combine and serve combined CSS/JS assets with simple cache-busting

00PHP

Since Sep 27Pushed 7mo agoCompare

[ Source](https://github.com/Hadi-Abedzadeh/Static-Assets)[ Packagist](https://packagist.org/packages/hadiabedzadeh/static-assets)[ RSS](/packages/hadiabedzadeh-static-assets/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Static Assets Combiner
======================

[](#static-assets-combiner)

A PHP package for combining and optimizing CSS/JS files with cache support and framework integration.

---

📦 Installation
--------------

[](#-installation)

```
composer require hadiabedzadeh/static-assets
```

### 🚀 Usage

[](#-usage)

```
use hadiabedzadeh\StaticAssets\StaticAssets;

echo StaticAssets::combineFiles([
    'assets/src/style1.css',
    'assets/src/style2.css'
], 'css', 'my-segment');

echo StaticAssets::combineFiles([
    'assets/src/app.js',
    'assets/src/utils.js'
], 'js', 'my-segment', 'async');
```

### ⚡ With Laravel

[](#-with-laravel)

### Example inside a Blade template:

[](#example-inside-a-blade-template)

```
{!! hadiabedzadeh\StaticAssets\StaticAssets::combineFiles([
    public_path('css/app.css'),
    public_path('css/theme.css')
], 'css', 'laravel', 'defer', public_path(), asset('')) !!}
```

### 🏛️ With Symfony

[](#️-with-symfony)

### Example inside a Twig template:

[](#example-inside-a-twig-template)

```
{{ hadiabedzadeh\StaticAssets\StaticAssets.combineFiles([
    'assets/css/app.css',
    'assets/css/theme.css'
], 'css', 'symfony', 'defer', project_root ~ '/public', asset(''))|raw }}
```

### ⚙️ Options

[](#️-options)

- $files: Array of file paths
- $type: 'css' or 'js'
- $segment: Output folder name (defaults to first URL segment)
- $jsLoad: '' | 'defer' | 'async'
- $publicPath: Filesystem path to public folder (defaults to getcwd() . '/public')
- $publicUrl: Base URL for assets (optional)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance44

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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/f78e6ae52c73a4633d997d6fc70ce0a2e92eee062d522a234e0c9f4a5c3e7d44?d=identicon)[Hadi-Abedzadeh](/maintainers/Hadi-Abedzadeh)

---

Top Contributors

[![Hadi-Abedzadeh](https://avatars.githubusercontent.com/u/13830295?v=4)](https://github.com/Hadi-Abedzadeh "Hadi-Abedzadeh (6 commits)")

### Embed Badge

![Health badge](/badges/hadiabedzadeh-static-assets/health.svg)

```
[![Health](https://phpackages.com/badges/hadiabedzadeh-static-assets/health.svg)](https://phpackages.com/packages/hadiabedzadeh-static-assets)
```

PHPackages © 2026

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