PHPackages                             snowsoft/asset - 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. snowsoft/asset

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

snowsoft/asset
==============

Asset Component for Orchestra Platform

v0.0.1(1y ago)054MITPHPPHP ^7.3 || ^8.0 || ^8.1 || ^8.2 || ^8.3

Since Apr 8Pushed 1y agoCompare

[ Source](https://github.com/snowsoft/asset)[ Packagist](https://packagist.org/packages/snowsoft/asset)[ Docs](http://orchestraplatform.com/docs/latest/components/asset/)[ Fund](https://paypal.me/crynobone)[ Fund](https://liberapay.com/crynobone)[ RSS](/packages/snowsoft-asset/feed)WikiDiscussions 6.x Synced 1mo ago

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

Asset Component for Orchestra Platform

Table of Content
----------------

[](#table-of-content)

- [Version Compatibility](#version-compatibility)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Registering Assets](#registering-assets)
    - [Dumping Assets](#dumping-assets)
    - [Asset Dependencies](#asset-dependencies)
    - [Asset Containers](#asset-containers)
    - [Asset Versioning](#asset-versioning)
- [Changelog](https://github.com/orchestral/asset/releases)

Version Compatibility
---------------------

[](#version-compatibility)

LaravelAsset5.5.x3.5.x5.6.x3.6.x5.7.x3.7.x5.8.x3.8.x6.x4.x7.x5.x8.x6.xInstallation
------------

[](#installation)

To install through composer, run the following command from terminal:

```
composer require "snowsoft/asset"

```

Configuration
-------------

[](#configuration)

Add following service providers in `config/app.php`.

```
'providers' => [

    // ...

    Orchestra\Asset\AssetServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class,

],
```

### Aliases

[](#aliases)

You might want to add `Orchestra\Support\Facades\Asset` to class aliases in `config/app.php`:

```
'aliases' => [

    // ...

    'Asset' => Orchestra\Support\Facades\Asset::class,

],
```

Usage
-----

[](#usage)

### Registering Assets

[](#registering-assets)

The Asset class provides a simple way to manage the CSS and JavaScript used by your application. To register an asset just call the add method on the Asset class:

#### Registering an asset:

[](#registering-an-asset)

```
Asset::add('jquery', 'js/jquery.js');
```

The add method accepts three parameters. The first is the name of the asset, the second is the path to the asset relative to the public directory, and the third is a list of asset dependencies (more on that later). Notice that we did not tell the method if we were registering JavaScript or CSS. The add method will use the file extension to determine the type of file we are registering.

### Dumping Assets

[](#dumping-assets)

When you are ready to place the links to the registered assets on your view, you may use the styles or scripts methods:

Dumping assets into a view:

```

    {!! Asset::styles() !!}
    {!! Asset::scripts() !!}

```

Above code can also be simplified as:

```

    {!! Asset::show() !!}

```

### Asset Dependencies

[](#asset-dependencies)

Sometimes you may need to specify that an asset has dependencies. This means that the asset requires other assets to be declared in your view before it can be declared. Managing asset dependencies couldn't be easier in Laravel. Remember the "names" you gave to your assets? You can pass them as the third parameter to the add method to declare dependencies:

Registering a bundle that has dependencies:

```
Asset::add('jquery-ui', 'js/jquery-ui.js', 'jquery');
```

In this example, we are registering the jquery-ui asset, as well as specifying that it is dependent on the jquery asset. Now, when you place the asset links on your views, the jQuery asset will always be declared before the jQuery UI asset. Need to declare more than one dependency? No problem:

Registering an asset that has multiple dependencies:

```
Asset::add('jquery-ui', 'js/jquery-ui.js', ['first', 'second']);
```

### Asset Containers

[](#asset-containers)

To increase response time, it is common to place JavaScript at the bottom of HTML documents. But, what if you also need to place some assets in the head of your document? No problem. The asset class provides a simple way to manage asset containers. Simply call the container method on the Asset class and mention the container name. Once you have a container instance, you are free to add any assets you wish to the container using the same syntax you are used to:

Retrieving an instance of an asset container:

```
Asset::container('footer')->add('example', 'js/example.js');
```

Dumping that assets from a given container:

```
{!! Asset::container('footer')->scripts() !!}
```

### Asset Versioning

[](#asset-versioning)

Another option to increase response time is by utilizing browser caching, while there few ways to do this we pick last modified time as our way to version the Asset.

```
Asset::container()->addVersioning();

// or alternatively
Asset::addVersioning();
```

> Note: this would only work with local asset.

You can remove adding versioning number by using:

```
Asset::container()->removeVersioning();

// or alternatively
Asset::removeVersioning();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance46

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% 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 ~0 days

Total

2

Last Release

405d ago

Major Versions

v0.0.1 → 6.x-dev2025-04-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4568234?v=4)[snowsoft](/maintainers/snowsoft)[@snowsoft](https://github.com/snowsoft)

---

Top Contributors

[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (417 commits)")[![snowsoft](https://avatars.githubusercontent.com/u/4568234?v=4)](https://github.com/snowsoft "snowsoft (5 commits)")[![sergejostir](https://avatars.githubusercontent.com/u/21297285?v=4)](https://github.com/sergejostir "sergejostir (2 commits)")

---

Tags

laravelassetorchestra-platformorchestral

### Embed Badge

![Health badge](/badges/snowsoft-asset/health.svg)

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

###  Alternatives

[orchestra/asset

Asset Component for Orchestra Platform

52177.4k4](/packages/orchestra-asset)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[orchestra/html

HTML Component for Orchestra Platform

40112.6k2](/packages/orchestra-html)[orchestra/memory

Memory Component for Orchestra Platform

11150.0k11](/packages/orchestra-memory)[fisharebest/laravel-assets

Asset management for Laravel

208.1k](/packages/fisharebest-laravel-assets)

PHPackages © 2026

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