PHPackages                             bfg/emitter - 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. bfg/emitter

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

bfg/emitter
===========

A description for emitter.

1.2.2(3y ago)016711MITPHP

Since Jan 8Pushed 3y ago2 watchersCompare

[ Source](https://github.com/bfg-s/emitter)[ Packagist](https://packagist.org/packages/bfg/emitter)[ RSS](/packages/bfg-emitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (1)

emitter
=======

[](#emitter)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/239335bbb2e24ac7096f242333efe57b5802e93b58e4486cd23fc046794c050d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6266672f656d69747465722e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/9de88b19c42a34c838367b483ca3d2e5008882aca4a3047bff31196a879f5bd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6266672f656d69747465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bfg/emitter)

Install
-------

[](#install)

`composer require bfg/emitter`

Usage
-----

[](#usage)

Set in you `RouteServiceProvider` router connection:

```
\Route::emitter();
```

For using with any guard use:

```
\Route::emitter('sanctum');
```

Blade
-----

[](#blade)

```
@emitterScripts();

@emitterScripts($options);
```

Possible options is:

- headers
- domain

For request configuring.

JavaScript
----------

[](#javascript)

```
$message('my-event', {});
```

Message is a signed request for an event. What to transmit the names of the events and at the same time not to transmit its full range of names, the system is looking for nesting in any space that is compiled depending on your security guard, the default is `web`So your nesting prefix will be the next `WebMessage`And all created and declared Events and will cause them consistently if there will be several events in one name.

Event search occurs on the following pattern:

> Send name: `my-event` or `my`;
>
> Called Event: `*`\\WebMessage\\MyEvent

> Send name: `actions:my-event` or `actions:my`;
>
> Called Event: `*`\\WebMessageActions\\MyEvent

> `*` - Maybe any value.

### VueJs Mixin

[](#vuejs-mixin)

```
Vue.mixin(VueMessageMutator);
```

### AlpineJs

[](#alpinejs)

Messages are supported by AlpineJS by default.

Event protection
----------------

[](#event-protection)

You can create a method with the name `access` in the event class, which is executed before performing an event, but after its design.

```
    ...
    public function access() {
        return \Auth::check() && \Auth::user()->isAdmin()
    }
    ...
```

Resource wrapping
-----------------

[](#resource-wrapping)

You can declare a property or method named `resource`, he must return the resource class that needs to be applied to the last truthful listener's result.

```
    ...
    public $resource = UserResource::class;
    // OR
    public function resource() {
        return UserResource::class;
    }
    ...
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [Xsaven](https://github.com/bfg)
- [All Contributors](https://github.com/bfg/emitter/contributors)

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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

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.

###  Release Activity

Cadence

Every ~115 days

Total

5

Last Release

1127d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59b2d162a30938ac2c3c56340ebea07a6778a3e1c86cb70b5bc28b69a1c3f04d?d=identicon)[bfg](/maintainers/bfg)

---

Top Contributors

[![Xsaven](https://avatars.githubusercontent.com/u/1726771?v=4)](https://github.com/Xsaven "Xsaven (5 commits)")

---

Tags

laravel

### Embed Badge

![Health badge](/badges/bfg-emitter/health.svg)

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

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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