Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fireable Laravel Package

envant/fireable

Envant Fireable is a Laravel package that automatically fires events when chosen Eloquent model attributes change. Define fireable fields on a model and react to updates with dedicated events, avoiding manual observer boilerplate and keeping model change handling clean and explicit.

View on GitHub
Deep Wiki
Context7

An elegant way to trigger Laravel events based on attributes changes.

Frequently asked questions about Fireable
How do I install envant/fireable in a Laravel app?
Install it with Composer using composer require envant/fireable. Add the Fireable trait to the Eloquent model you want to watch, then declare the attribute-to-event map on that model. Basic use needs no migrations, config publishing, or call-site changes; you write ordinary Laravel event classes and listeners.
Does envant/fireable support Laravel 10, Laravel 11, and PHP 8.2 or 8.3?
The last release was April 2022, which predates several Laravel majors, so support for newer Laravel versions and PHP 8.2 or 8.3 is not guaranteed. Check the package's composer.json constraints and run a throwaway compatibility spike on your exact Laravel and PHP versions before committing. If constraints block you, fork the package and widen them; the codebase is small enough that this is a few hours of work.
How does Fireable trigger events when Eloquent model attributes change?
Fireable is a trait that hooks into Eloquent's save lifecycle, inspects which mapped attributes changed, and dispatches the event classes you declared for them. It uses Laravel's normal event dispatcher, so events are synchronous unless your listeners implement ShouldQueue. Confirm the exact change-detection method, such as dirty attributes versus wasChanged, against your target version with a test.
Does Fireable fire events on model creation or only on updates?
The package's stated purpose is reacting to attribute changes on update, and it is not clearly documented whether a create also dispatches mapped events. Do not assume create behavior from the README; write an integration test that creates a model and asserts which events fire. This matters most for models where creation and update share the same code path.
Can I map multiple attributes to different events on one model?
Yes. You declare a map on the model from attribute names to event classes, so each fireable field can have its own dedicated event. Whether a single save with several changed attributes dispatches multiple events or one aggregate event should be asserted in a test, because that determines listener design and idempotency.
How does Fireable handle casts like enums, JSON columns, dates, and encrypted attributes?
Cast handling is not documented in the available material, and change detection depends on how Eloquent stores and compares the underlying attribute values. Test enums, JSON or array columns, dates, and encrypted attributes explicitly on your target version. If a cast changes the value representation between reads, verify the package still detects the change you expect.
What happens with saveQuietly(), withoutEvents(), bulk updates, and rolled-back transactions?
saveQuietly() and withoutEvents() mute Eloquent model events, so mapped events should not fire on those paths, but verify it. Bulk updates such as Model::where(...)->update() bypass model events entirely, so Fireable cannot see them. Inside a transaction, events dispatch immediately and are not rolled back, so queue listeners or defer side effects if rollback consistency matters.
How do I test which events Fireable dispatches?
Use Laravel's Event::fake() in a feature test, update a model with a mapped attribute, and assert the expected event class was dispatched with the right payload. Add negative assertions for saveQuietly(), bulk updates, and unchanged saves so you lock down the semantics you rely on. These tests also protect you if you later fork or replace the package.
Are Fireable events queued, and can it replace my existing observers?
Events go through Laravel's dispatcher synchronously; make listeners implement ShouldQueue if they do slow work. Fireable is additive and complements observers, so do not rip out existing observers up front. Retire an observer for an attribute only after tests show the Fireable event and listeners cover the same behavior.
Is envant/fireable actively maintained, and what are the alternatives?
Maintenance risk is real: the last release was April 2022 and the package has a single maintainer, though the surface area is small. Pin an exact version, add it to periodic dependency reviews, and be ready to vendor or fork it. Alternatives are Laravel observers, model booted hooks, or a small in-house trait that maps changed attributes to events.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle