- How do I install larapack/voyager-hooks in a Laravel app?
- Install it with Composer as larapack/voyager-hooks and confirm that service provider discovery or manual registration works for your Laravel version. Publish any configuration only after checking the package source and documenting the exact version you pin. Run a time-boxed proof of concept on a non-critical Voyager admin screen before integrating it more widely.
- Which Laravel, Voyager, and PHP versions does larapack/voyager-hooks support?
- The last release was 2020-03-04, so compatibility with modern Laravel, Voyager, and PHP versions is unverified. Pin the exact package version and validate Composer constraints against the framework and Voyager versions already in use. Treat PHP 8 and Laravel 8 or newer as unverified until an admin smoke test passes.
- What hooks does larapack/voyager-hooks provide and where do they run?
- It adds a hook layer to Laravel Voyager so you can run custom callbacks at key points in the admin panel, including BREAD, forms, and UI behavior. The package is intended for admin/request-time extensions rather than general workflow or high-volume processing. Confirm the specific hooks you need against the source and documentation, and avoid depending on undocumented hook behavior.
- Can I use Voyager Hooks without modifying Voyager core files?
- Yes, the package is designed to extend Voyager admin behavior through hooks without touching core files. Keep business logic in application services or providers rather than inside hook callbacks so it remains testable and replaceable. Use hooks only for low-risk admin extensions, especially in legacy Voyager-based applications.
- Is larapack/voyager-hooks safe for production use?
- Treat it as a tactical, legacy-only accelerator where Voyager is already deeply embedded, not as a strategic platform component. Its stale release cadence and limited modern support matrix create high dependency risk, so use feature flags, regression tests, authorization tests, logging, and a rollback path. Avoid putting critical business logic in hooks without coverage and an exit plan.
- How do I test hooks in the Voyager admin panel?
- Start with a time-boxed proof of concept on one non-critical admin screen and add smoke tests around the affected BREAD, form, and UI behavior. Add regression and authorization tests before promoting through staging to production. Because hooks may silently stop firing after Voyager upgrades, include upgrade-focused checks and logging in your test plan.
- What are the alternatives to larapack/voyager-hooks for extending Voyager?
- Evaluate native Laravel events and listeners, application service providers, view overrides, or a controlled Voyager fork for each use case. Native Laravel events are often a better fit when you do not need Voyager-specific hook points. Keep a replacement path documented in case the package blocks framework upgrades.
- Can I fork or vendor larapack/voyager-hooks if it is incompatible?
- Yes, if the package is incompatible with your stack, fork it into an internal Composer or VCS dependency and track patches explicitly. Pin the exact version in Composer and assign an internal owner for compatibility and security reviews. Document the fork, patch history, review date, and replacement path before using it in production.
- Why are my Voyager hooks not firing after an upgrade?
- Hooks can silently stop firing after Voyager upgrades, and provider boot order can cause race conditions. Check service provider registration, package version pins, and Voyager compatibility first, then review logs and admin smoke tests. Keep hook callbacks small and feature-flagged so you can roll back quickly.
- Is larapack/voyager-hooks still maintained?
- The last release was in March 2020, with low upstream activity and community-only support. Expect the internal team to own patches, monitor security advisories, and schedule compatibility checks before Laravel or PHP upgrades. Assign a maintainer and document version pins, review dates, and an exit plan.