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
Laravel Observers

Laravel Observers Laravel Package

cleaniquecoders/laravel-observers

A lightweight Laravel package for organizing and registering Eloquent model observers. Keep event logic tidy, reduce boilerplate, and connect model events to dedicated observer classes with a clean, maintainable setup.

View on GitHub
Deep Wiki
Context7

A collection of observer classes that can be use in your Laravel application.

Frequently asked questions about Laravel Observers
How do I install cleaniquecoders/laravel-observers in a Laravel application?
Install it with Composer by running composer require cleaniquecoders/laravel-observers. It is a lightweight leaf dependency, so it does not impose a database schema, queue, or cache contract. After installation, review the package README for any configuration or registration steps, then point your observer classes at the models you want to track.
Which Laravel versions does cleaniquecoders/laravel-observers support?
Version 4.4.0 adds a Laravel 13 constraint via illuminate/* ^13.0 and is expected to retain support for Laravel 11 and 12. Before upgrading, read the published composer.json to confirm the retained illuminate range, because minor releases can sometimes raise the dependency floor. The 4.3.x line remains a safe pin if you are not yet ready for Laravel 13.
How do I register an observer class with this package?
The package is built around dedicated observer classes that you connect to Eloquent models. Registration follows Laravel's first-class observer idiom, so you attach an observer using the model's observe method or the package's documented registration setup. Keep each observer focused on one model and let the package handle the wiring to reduce boilerplate.
Do I need to rewrite my existing model event code to adopt this package?
No, adoption is additive and low-friction. Version 4.4.0 introduces no new public APIs and no deprecations, so existing model event logic can stay in place while you migrate observers incrementally. The main compatibility consideration is the Composer dependency floor, not the package's own surface.
Is cleaniquecoders/laravel-observers compatible with Laravel 13?
Composer constraint support for Laravel 13 was added in 4.4.0, but the CI matrix is described as running Laravel 12 with PHP 8.4 and 8.3. That means Laravel 13 support is currently asserted by constraint rather than proven by a green CI lane. Validate on staging before gating a Laravel 13 migration on this package.
What PHP versions are supported by this package?
The release notes and CI description point to PHP 8.4 and 8.3 being exercised. Check composer.json for any upper PHP bound that could block a future runtime upgrade such as PHP 8.5. If you need certainty for your runtime roadmap, confirm the PHP constraint directly rather than inferring it from the framework constraint.
How should I test that observers are registered correctly?
Add an observer-registration smoke test to your suite and assert that the expected model events invoke the observer methods. The package's own dev tooling moved to PHPUnit 12 and Pest 4 in 4.4.0, which is dev-only and does not affect installed consumers. If you reuse its published phpunit.xml.dist conventions, schedule that test-infrastructure migration separately from the package bump.
Is this a replacement for Laravel's built-in observer support?
No, it complements Laravel's native observer support rather than replacing it. Laravel already treats observers as a first-class idiom, and this package is an additive collection of observer classes plus a cleaner registration setup. It is best used to keep event logic tidy across many models, not to introduce a parallel event system.
What are the alternatives to cleaniquecoders/laravel-observers?
Laravel's built-in observer registration is the most direct alternative if you only have a few models. If you need broader event-driven architecture, consider other packages in the Eloquent lifecycle-extension space or a domain-event library. This package's differentiator is its narrow scope: a small, single-purpose collection with low steady-state maintenance cost.
Is the package actively maintained, and how do I upgrade from 4.3 to 4.4?
Version 4.4.0 is a compatibility release focused on Laravel 13, PHPUnit 12, and Pest 4, with no functional changes to the runtime API. Upgrade by bumping to ^4.4 in a branch and running composer update cleaniquecoders/laravel-observers --with-dependencies, then run your full suite. Because observer misregistration fails quietly, include a registration smoke test before shipping.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core