PHPackages                             zachflower/ignorable-observers - 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. [Database &amp; ORM](/categories/database)
4. /
5. zachflower/ignorable-observers

ActiveLibrary[Database &amp; ORM](/categories/database)

zachflower/ignorable-observers
==============================

Dynamically disable/enable Laravel's Eloquent model observers

v0.2.0(6y ago)24330.7k↓64.7%1MITPHPCI failing

Since Feb 7Pushed 6y ago2 watchersCompare

[ Source](https://github.com/zachflower/ignorable-observers)[ Packagist](https://packagist.org/packages/zachflower/ignorable-observers)[ RSS](/packages/zachflower-ignorable-observers/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Ignorable Observers
===================

[](#ignorable-observers)

[![Code Climate](https://camo.githubusercontent.com/6ae546929d179f4c911883b96e85f77c3062c30e71357e5cd943eec0e10c1722/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7a616368666c6f7765722f69676e6f7261626c652d6f62736572766572732f6261646765732f6770612e737667)](https://codeclimate.com/github/zachflower/ignorable-observers) [![build](https://camo.githubusercontent.com/2d56382d0d6b48a50451c118ec3855eb6ecdbe3c2be439107c09d187621cb1ac/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e742e7376673f75726c3d6874747073253341253246253246616374696f6e732d62616467652e6174726f782e6465762532467a616368666c6f77657225324669676e6f7261626c652d6f62736572766572732532466261646765266c6162656c3d6275696c64)](https://actions-badge.atrox.dev/zachflower/ignorable-observers/goto) ![Packagist](https://camo.githubusercontent.com/f1ea7d3f114f6ae43476c3427c57872180b4b4d0ac57a8df166f3775b5b38f29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a616368666c6f7765722f69676e6f7261626c652d6f62736572766572732e737667)

Dynamically disable/enable Laravel's Eloquent model observers. This library provides the ability to temporarily disable observable events for Eloquent models. For example, temporarily disable observers that kick off emails, push notifications, or queued calculations when performing a large number of database inserts or updates.

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

[](#installation)

Install using composer:

```
composer require zachflower/ignorable-observers

```

Usage
-----

[](#usage)

To give an Eloquent model the ability to temporarily ignore observers, simply add the `IgnorableObservers` trait:

```
