PHPackages                             koalabs/evento - 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. koalabs/evento

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

koalabs/evento
==============

Dead simple event management for your Laravel application

1.0.2(11y ago)022MITPHPPHP &gt;=5.4.0

Since Oct 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/koalabs-lab/laravel-evento)[ Packagist](https://packagist.org/packages/koalabs/evento)[ RSS](/packages/koalabs-evento/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel Evento
==============

[](#laravel-evento)

Dead simple event management for your Laravel application. This is just *our* way of managing events. Use with care.

*NOTE: Most of the code is inspired on Jeffrey Way's awesome Laracasts series*.

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

[](#installation)

You know this one already.

In your application's root directory, open up the *composer.json* file and add the package to the `require` section so it looks like this:

```
"require": {
    "koalabs/evento": "1.*"
},
```

Open the command line, and in the root of your application, run the Composer update like this:

```
php composer.phar update

```

Now let's add the Evento Service Provider. Open the *app/config/app.php* file and in the `providers` array, add the following line:

```
'Koalabs\Evento\EventoServiceProvider'
```

Optionally, you may want to add the Facade for beautiful Laravel-friendly semantics. In your `aliases` array in the same app configuration file, add:

```
'Evento' => 'Koalabs\Evento\Facades\Evento'
```

Usage
-----

[](#usage)

The way I picture myself using this is directly on the controllers. Using it alongside a repository pattern or even in your models is also valid.

Now imagine you were creating an application for managing a podcasts directory. You'd have a `PodcastsController` with all the usual CRUD methods. For the sake of simplicity, let's only look at the `store` method. It could look something like this:

```
/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
public function store()
{
    $input = Input::only('title', 'subtitle', 'author');

    $podcast = Podcast::create($input);

    Evento::fire(new PodcastAdded($podcast));
}
```

Now it is most likely you'll want to create a folder in which to keep all your events. I'd call this the *Events* folder. The `PodcastAdded` class is an example for how to name your events inside that folder.

### Listening for the events

[](#listening-for-the-events)

After raising the events, you will then want to listen to them. For this, Evento provides you with a handy class: **EventListener**. To use it you'll simply have to extend it:

```
use Koalabs\Evento\EventListener;
use Podcasts\Events\PodcastAdded;

class EmailNotifier extends EventListener {

  public function whenPodcastAdded(PodcastAdded $podcast)
  {
    // Do some stuff here
  }

}
```

It's important to note the naming convention: **Every method handling an event has to start with the word `when`**.

### One nice little trick

[](#one-nice-little-trick)

You can automate much of your Event listening with a Service Provider of your own. Try this (maybe inside a `Listeners` folder or something):

```
use Illuminate\Support\ServiceProvider;

class ListenerServiceProvider extends ServiceProvider {

  /**
   * Register the service provider
   *
   * @return void
   */
  public function register()
  {
    $listeners = $this->app['config']->get('evento::listeners');

    foreach ($listeners as $listener)
    {
      $this->app['events']->listen('Habitat.*', $listener);
    }
  }

}
```

Oh and don't forget to export the configuration files.:

`php artisan config:publish koalabs/evento`

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~0 days

Total

3

Last Release

4284d ago

### Community

Maintainers

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

---

Top Contributors

[![crloscstillo](https://avatars.githubusercontent.com/u/1431847?v=4)](https://github.com/crloscstillo "crloscstillo (13 commits)")

### Embed Badge

![Health badge](/badges/koalabs-evento/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M278](/packages/illuminate-pipeline)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.6M371](/packages/illuminate-redis)

PHPackages © 2026

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