PHPackages                             honda/pushed-resources - 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. honda/pushed-resources

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

honda/pushed-resources
======================

Add styles or scripts on the fly

1.1.0(5y ago)01.4k[3 PRs](https://github.com/felixdorn/pushed-resources/pulls)MITPHPPHP ^8CI passing

Since Mar 15Pushed 5mo agoCompare

[ Source](https://github.com/felixdorn/pushed-resources)[ Packagist](https://packagist.org/packages/honda/pushed-resources)[ Docs](https://github.com/laravel-honda/pushed-resources)[ RSS](/packages/honda-pushed-resources/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (5)Dependencies (8)Versions (9)Used By (0)

Add styles or scripts on the fly with Blade
===========================================

[](#add-styles-or-scripts-on-the-fly-with-blade)

[![Tests](https://github.com/laravel-honda/pushed-resources/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/laravel-honda/pushed-resources/actions/workflows/tests.yml)[![Formats](https://github.com/laravel-honda/pushed-resources/actions/workflows/formats.yml/badge.svg?branch=master)](https://github.com/laravel-honda/pushed-resources/actions/workflows/formats.yml)[![Version](https://camo.githubusercontent.com/9caea7185cd93b425a2dc48e19d024f74ca255a775f6b6eb21814eab4f92cc13/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f7075736865642d7265736f75726365732f76657273696f6e)](//packagist.org/packages/honda/pushed-resources)[![Total Downloads](https://camo.githubusercontent.com/e93669ffe7416dce03c7a1035c997ef35068212167604f991959b5af1f5efc1d/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f7075736865642d7265736f75726365732f646f776e6c6f616473)](//packagist.org/packages/honda/pushed-resources)[![License](https://camo.githubusercontent.com/eae39b3cd91054ceb54e1ca8732e839ab9b27db4fd80b85a5d441d85e6ac897f/68747470733a2f2f706f7365722e707567782e6f72672f686f6e64612f7075736865642d7265736f75726365732f6c6963656e7365)](//packagist.org/packages/honda/pushed-resources)

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

[](#installation)

You can install the package via composer:

```
composer require honda/pushed-resources
```

Usage
-----

[](#usage)

### Pushing resources

[](#pushing-resources)

#### Using Blade

[](#using-blade)

```

    console.log('Hello there!')

    * { background: rebeccapurple }

    @livewireStyles
    @livewireScripts

```

#### Using PHP

[](#using-php)

```
use Honda\PushedResources\Resources\Script;
use Illuminate\View\ComponentAttributeBag;

Script::create()
    ->value('something.js')
    ->attributes(['a' => 'b']) // or
    ->attributes(new ComponentAttributeBag(['a' => 'b']));
```

### Retrieving resources

[](#retrieving-resources)

#### Using Blade

[](#using-blade-1)

```

```

#### Using PHP

[](#using-php-1)

```
use Honda\PushedResources\Resources\Script;
use Illuminate\View\ComponentAttributeBag;

Script::create()
    ->value('something.js')
    ->attributes(['a' => 'b']) // or
    ->attributes(new ComponentAttributeBag(['a' => 'b']));
```

> You can also use `Style`, `Script`, `RawScript`, `RawStyle`, `Blade` in the same namespace

### Custom Types

[](#custom-types)

A good use case for that is livewire assets, you may not want to those on a page where you are not using Livewire. You could do something like this:

```
// app/View/Resources/BladeScript or wherever you think it makes sense.
class BladeScript extends \Honda\PushedResources\Resources\Blade {
    public function getTag() : string{
        return 'blade-script';
    }
}
```

```
// app/View/Components/BladeScript.php
class BladeScript extends \Honda\PushedResources\Components\Blade {}
```

```
// in a page with livewire

// at the bottom of
 in your layout file

```

Testing
-------

[](#testing)

```
composer test
```

Octane
------

[](#octane)

This package is compatible with Laravel Octane.

Credits
-------

[](#credits)

- [Félix Dorn](https://github.com/felixdorn)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance50

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.9% 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 ~15 days

Total

5

Last Release

1829d ago

Major Versions

0.3.0 → 1.0.02021-04-16

PHP version history (2 changes)0.1.0PHP ^7.4

1.1.0PHP ^8

### Community

Maintainers

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

---

Top Contributors

[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (24 commits)")[![RedIMeca](https://avatars.githubusercontent.com/u/12409864?v=4)](https://github.com/RedIMeca "RedIMeca (11 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")

---

Tags

packagehondapushed-resources

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/honda-pushed-resources/health.svg)

```
[![Health](https://phpackages.com/badges/honda-pushed-resources/health.svg)](https://phpackages.com/packages/honda-pushed-resources)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[mauricius/laravel-htmx

Laravel helper library for Htmx

364101.1k1](/packages/mauricius-laravel-htmx)[illuminate/reflection

The Illuminate Reflection package.

361.6M3](/packages/illuminate-reflection)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[spatie/laravel-screenshot

Take screenshots of web pages in Laravel apps

7615.9k2](/packages/spatie-laravel-screenshot)

PHPackages © 2026

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