- What is MoonGuard used for in a Laravel application?
- MoonGuard is described as a Laravel package for simple, flexible role and permission management. It lets you define roles and abilities, assign them to users, and protect routes and resources with minimal configuration. Check the package README for the exact models, traits, and APIs before integrating it.
- How do I install MoonGuard with Composer?
- Install it with composer require taecontrol/moonguard. As a Laravel package it will likely use package auto-discovery, but the provided release notes do not include installation, config publishing, or migration steps. Validate installation on a non-production branch and follow the README for any service provider or configuration setup.
- Does MoonGuard support Laravel 11?
- Yes, the v1.2.3 release notes explicitly include a Laravel 11 dependency update, which is a positive compatibility signal. You should still inspect composer.json to confirm the exact Laravel constraint and whether Laravel 11 support is additive or replaces older versions. Laravel 11 also requires PHP 8.2 or newer.
- Does MoonGuard work with Laravel 10 or earlier?
- That is not confirmed by the provided release notes. v1.2.3 adds Laravel 11 dependency support, but the notes do not show whether Laravel 10 and below remain supported or are dropped. Check composer.json constraints and, if needed, pin to v1.2.2 or test cross-version support in a sandbox.
- What PHP version does MoonGuard require?
- The exact PHP requirement is not stated in the provided release notes. Because v1.2.3 adds Laravel 11 support, the package may indirectly require PHP 8.2 or newer if that constraint is applied. Always verify the real requirement in the package composer.json before upgrading.
- How do I define roles and abilities in MoonGuard?
- The package overview says MoonGuard lets you define roles and abilities, assign them to users, and protect resources. The provided excerpt does not include the exact syntax, migrations, or model traits. Review the README and package source before writing production authorization code.
- How do I protect routes with MoonGuard?
- MoonGuard is intended to protect routes and resources with organized authorization logic. The exact mechanism, such as middleware, gates, policies, or Blade helpers, is not confirmed in the provided release notes. Inspect the package README and middleware aliases, then test protected and unprotected routes in a feature branch.
- Is MoonGuard safe to use in production?
- Treat it as medium risk until you validate it against your stack. v1.2.3 is a patch release with dependency updates, but framework constraint changes can affect consumers on older Laravel or PHP versions. Run composer audit, review composer.json, test authentication and authorization flows, and assign an owner before rollout. Stage adoption behind configuration and monitor auth failures and error rates.
- What is the follow-redirects dependency in MoonGuard?
- The v1.2.3 release notes show a Dependabot bump of follow-redirects from 1.15.5 to 1.15.6. This is commonly a JavaScript transitive dependency used in tooling, documentation, or CI rather than the PHP runtime. Confirm it is dev-only and does not enter your production Composer vendor tree.
- How does MoonGuard compare to other Laravel permission packages?
- MoonGuard is positioned as a simple, flexible Laravel role and permission package with minimal configuration. Compare it with alternatives by checking API fit, Laravel and PHP version constraints, test coverage, maintenance activity, and security posture. Run a time-boxed spike with your existing auth model before choosing it over an established package.