PHPackages                             plank/laravel-hush - 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. [Framework](/categories/framework)
4. /
5. plank/laravel-hush

ActiveLibrary[Framework](/categories/framework)

plank/laravel-hush
==================

A targeted version of the Laravel Frameworks withoutEvents method.

v13.1.4(5d ago)113.5k↑34.3%[1 PRs](https://github.com/plank/laravel-hush/pulls)2MITPHPPHP ^8.3CI passing

Since Oct 25Pushed 5d ago2 watchersCompare

[ Source](https://github.com/plank/laravel-hush)[ Packagist](https://packagist.org/packages/plank/laravel-hush)[ Docs](https://github.com/plank/laravel-hush)[ RSS](/packages/plank-laravel-hush/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (24)Versions (33)Used By (2)

[![](art/hush.png)](https://plank.co)

[![PHP Version Support](https://camo.githubusercontent.com/c018469f03428980db6d9be1be0e95976f68d81bb174133c37b7ac132159b5fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706c616e6b2f6c61726176656c2d687573683f636f6c6f723d253233666165333730266c6162656c3d706870266c6f676f3d706870266c6f676f436f6c6f723d253233666666)](https://packagist.org/packages/plank/laravel-hush)[![GitHub Workflow Status](https://camo.githubusercontent.com/1159a2849abe6c2248c77e4ce8ea6b10674ffe1d04335e26c1cd4343a79501ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706c616e6b2f6c61726176656c2d687573682f72756e2d74657374732e796d6c3f6272616e63683d6d61696e2626636f6c6f723d253233626663396264266c6162656c3d72756e2d7465737473266c6f676f3d676974687562266c6f676f436f6c6f723d253233666666)](https://github.com/plank/laravel-hush/actions?query=workflow%3Arun-tests)

Laravel Hush
============

[](#laravel-hush)

laravel-hush is a Laravel package that allows you to disable the observers and handlers for model events during the execution of a passed in closure. It functions as a more targetted version of the `withoutEvents()` method that ships with Laravel.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [withoutObserver(string $observer, Closure $callback)](#withoutobserverstring-observer-closure-callback)
    - [withoutObservers(array $observers, Closure $callback)](#withoutobserversarray-observers-closure-callback)
    - [withoutHandler(string $event, Closure $callback, array $classes = \[\])](#withouthandlerstring-event-closure-callback-array-classes)
    - [withoutHandlers(array $events, Closure $callback, array $classes = \[\])](#withouthandlersarray-events-closure-callback-array-classes)
- [Credits](#credits)
- [License](#license)
- [Security Vulnerabilities](#security-vulnerabilities)

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

[](#installation)

You can install the package via composer:

```
composer require plank/laravel-hush
```

Usage
-----

[](#usage)

The package ships with one trait: `HushesHandlers`

To enable the functionality on a model, simply include the trait on it.

It implements four methods:

### withoutObserver(string $observer, Closure $callback)

[](#withoutobserverstring-observer-closure-callback)

This method will disable any handlers in the provided class for all of the models observable events during the exection of the callback.

Example assuming `User` uses `HushesHandlers`. In this example no handlers from the entire `UserObserver` class will be called during the execution of the callback, for any observable event.

```
User::withoutObserver(UserObserver::class, function () {
    User::create(['name' => 'John Doe']);
});
```

### withoutObservers(array $observers, Closure $callback)

[](#withoutobserversarray-observers-closure-callback)

This method is the same as `withoutObserver()` but allows you to pass in an array of observer classes to disable.

For example:

```
User::withoutObservers([UserObserver::class, ExpirableObserver::class], function () {
    User::create(['name' => 'John Doe']);
});
```

### withoutHandler(string $event, Closure $callback, array $classes = \[\])

[](#withouthandlerstring-event-closure-callback-array-classes--)

This method will disable handlers for the provided event during the execution of the callback.

When no classes are provided, it will disable all handlers for the event.

When classes are provided (including classes where handlers have been added statically) it will only disable the registered handlers which are from the provided classes.

In the following example all `created` event handlers would be disabled, however if there were `creating` handlers registered for example, those event handlers would still run.

```
User::withoutHandler('created', function () {
    User::create(['name' => 'John Doe']);
});
```

In the following example all `created` event handlers defined in the `User` model would be disabled, however if there was a `created` handler in a `UserObserver` class (or anywhere else), it would still handle the event.

```
User::withoutHandler('created', function () {
    User::create(['name' => 'John Doe']);
}, [User::class]);
```

### withoutHandlers(array $events, Closure $callback, array $classes = \[\])

[](#withouthandlersarray-events-closure-callback-array-classes--)

This method is the same as `withoutHandler()` but allows you to pass in an array of events to disable handlers for.

Credits
-------

[](#credits)

- [Kurt Friars](https://github.com/kfriars)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within siren, please send an e-mail to . All security vulnerabilities will be promptly addressed.

Check Us Out!
-------------

[](#check-us-out)

[ ![](https://camo.githubusercontent.com/039eee1ba9a2d1d596a7717543932e2bd5408ba5057f3dd50a8558729ce93235/68747470733a2f2f706c616e6b2e636f2f6f70656e2d736f757263652f62616e6e6572)](https://plank.co/open-source/learn-more-image)Plank focuses on impactful solutions that deliver engaging experiences to our clients and their users. We're committed to innovation, inclusivity, and sustainability in the digital space. [Learn more](https://plank.co/open-source/learn-more-link) about our mission to improve the web.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance99

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~39 days

Recently: every ~0 days

Total

26

Last Release

5d ago

Major Versions

v10.1.1 → v11.1.12025-01-31

v10.1.0 → v12.1.12025-03-12

v10.1.2 → v11.1.22025-12-16

v11.1.2 → v13.1.32026-03-23

v11.1.3 → 13.x-dev2026-06-30

PHP version history (3 changes)v1.0.0PHP ^8.1

v12.1.1PHP ^8.2

v13.1.3PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![kfriars](https://avatars.githubusercontent.com/u/3378675?v=4)](https://github.com/kfriars "kfriars (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelplanklaravel-hush

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/plank-laravel-hush/health.svg)

```
[![Health](https://phpackages.com/badges/plank-laravel-hush/health.svg)](https://phpackages.com/packages/plank-laravel-hush)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M102](/packages/dedoc-scramble)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

811334.1k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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