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 Trigger

Laravel Trigger Laravel Package

huangdijia/laravel-trigger

A lightweight Laravel package for defining and firing triggers tied to events or model changes. Register reusable trigger actions in configuration or service providers, then let them run automatically when the matching event occurs, keeping side effects decoupled from your controllers and models.

View on GitHub
Deep Wiki
Context7

MySQL event subscriber base on MySQLReplication

Frequently asked questions about Laravel Trigger
What is huangdijia/laravel-trigger used for?
It is a Laravel package for defining and firing triggers tied to events or model changes. Register reusable trigger actions in configuration or service providers, then let them run when the matching event occurs. This keeps side effects decoupled from controllers and models. The overview also describes it as a MySQL event subscriber based on MySQLReplication, so confirm your intended trigger source in the README.
How do I install huangdijia/laravel-trigger?
Install it with Composer using composer require huangdijia/laravel-trigger. Laravel package auto-discovery should register the service provider; publish any package configuration if the README provides it. Then define your trigger actions and map them to the events or model changes you want to observe. Confirm exact setup steps for v6.1.0 in the repository README.
How do I register trigger actions in laravel-trigger?
The package is designed for reusable trigger actions registered in configuration or service providers. Define the action once and map it to the event or model change that should fire it. That centralizes trigger logic instead of scattering it across controllers. Check the README for exact config keys, class names, and registration syntax.
Does huangdijia/laravel-trigger support Laravel 13?
v6.1.0 adds Laravel 13 compatibility, and the release contains no new features, API changes, or deprecations. The TPM assessment describes it as a Composer/CI constraint change rather than proven runtime coverage. Treat Laravel 13 support as claimed by the release but verify trigger introspection and migration paths in your own test matrix. A constraint bump is not a full compatibility guarantee.
Which database engines does laravel-trigger support?
The overview says MySQL event subscriber based on MySQLReplication, while the TPM assessment lists MySQL 5.7/8, MariaDB, PostgreSQL, and SQL Server as engines to confirm. The README should be the source of truth for tested engines and versions. Do not assume SQLite support for database-native trigger behavior. Validate against your production engine before adoption.
Can I test laravel-trigger with SQLite?
Trigger behavior is engine-specific and often absent or partially supported in SQLite or in-memory databases. Teams that test on SQLite and deploy to MySQL or PostgreSQL can get green CI and broken production semantics. If you rely on database-native trigger behavior, run integration tests against the production engine. The TPM assessment identifies this as the largest technical risk.
How should I handle trigger rollbacks and drift?
The package's value is versioning trigger definitions alongside Laravel migrations or artisan commands. Confirm each trigger has a documented down path and that migrate:rollback drops it safely. Ask how the package detects drift from triggers created out-of-band. Trigger DDL is often less reversible than table DDL.
Is huangdijia/laravel-trigger safe for production?
It is a small, single-maintainer ecosystem package, and v6.1.0 is a single-change Laravel 13 compatibility release. That signals maintenance but not heavy production adoption. Confirm engine support, rollback behavior, drift detection, observability, issue-response cadence, and security reporting. Seek public references at non-trivial scale if your use case is critical.
What are alternatives to laravel-trigger?
For side effects in PHP, use Laravel events, listeners, observers, or queued jobs. For database-enforced invariants, use native MySQL or PostgreSQL triggers managed in your own migrations or by a DBA. The package fits when you want Laravel lifecycle management for trigger definitions. If your domain logic belongs in PHP, standard events and listeners are simpler.
How do I debug triggers that are invisible to code search?
Triggers can be invisible to code search, static analysis, and most observability tooling. Failures may surface as opaque driver errors far from the originating write. Add integration tests against the production engine, log trigger execution where possible, and document each trigger's purpose and rollback path. Review trigger definitions like schema changes.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections