- How do I install Kaguya in a Laravel application?
- Install it with Composer using composer require panjinamjaelf/kaguya, then follow the repository README for service provider registration and any publishable config. Kaguya follows Laravel conventions and is described as minimal to install, so the steps should be short. Run the package migration if one is provided before reading or writing settings. Confirm the exact commands in the README because the excerpt here does not list them.
- Which Laravel and PHP versions does Kaguya support?
- Do not rely on the README alone; inspect the composer.json illuminate/* and php constraints, which are the honest compatibility signal. Because Kaguya is a small, lightly starred package, assume it is tested mainly against the Laravel and PHP versions the maintainer uses. Validate it against your own matrix, especially if you run Laravel 9 through 11, and budget time for a compatibility shim or a narrower rollout.
- How does Kaguya store settings in the database?
- The storage model is not confirmed in the provided material and should be verified by reading the migration and model. Kaguya could use a single row, a key/value table, or a JSON blob, and each choice affects query patterns and bulk reads. The technical evaluation flags this as a first-order question before adoption.
- Does Kaguya cache settings, and how is the cache invalidated on write?
- Caching and invalidation are among the hardest parts of any settings package, and the evaluation explicitly asks how Kaguya handles them. Check whether reads go through Laravel's cache and whether writes clear or refresh the relevant keys. If the invalidation strategy is unclear, do not assume stale values will resolve themselves in production.
- Can Kaguya handle multi-tenant or per-scope setting overrides?
- Multi-tenant or per-scope overrides are a key open question for Kaguya and are not confirmed by the overview. Read the schema and accessor code to see whether settings can be scoped per tenant, team, or environment. If scoping is absent, either wrap the package behind your own repository or use a bespoke settings table with explicit columns.
- Does Kaguya encrypt sensitive setting values at rest?
- Encryption of secret values at rest is listed as an unresolved question in the technical evaluation. Do not store API keys or credentials in Kaguya until you confirm it encrypts values or that you can add encrypted casts safely. Otherwise keep secrets in Laravel's encrypted config or a dedicated secret manager.
- Are Kaguya setting values typed on retrieval, or returned as raw strings?
- The evaluation asks whether Kaguya returns typed values such as int, bool, and array or raw strings. Inspect the accessor implementation before relying on comparisons and boolean checks in your code. If values come back as strings, add a typed wrapper in your application layer rather than casting at every call site.
- Is Kaguya safe and mature enough for production use?
- Kaguya has a low star count and a composite score of 1.88, so treat it as unproven and likely single-maintainer. The MIT license means you can fork it legally, but that does not remove the engineering cost of maintaining an orphaned dependency. Spike it in a throwaway branch, read the source end to end, and adopt it behind an interface before using it in production.
- How do I avoid locking my Laravel codebase to Kaguya?
- Define an internal SettingsRepository contract in your application layer and bind it to Kaguya in a service provider. Resolve settings only through that contract and keep Kaguya's facade out of domain code. This costs about a day and lets you swap to spatie/laravel-settings or a homegrown implementation without touching call sites.
- What are the alternatives to Kaguya for Laravel settings management?
- spatie/laravel-settings is the obvious established alternative mentioned in the evaluation, and a bespoke settings table with explicit columns is often clearer for domain-specific values. Choose Kaguya only where settings are genuinely dynamic and a generic key/value store is acceptable. If your settings are already first-class domain entities, a custom table will be easier to reason about.