- How do I install juststeveking/laravel-redoc in a Laravel app?
- Install it with Composer using composer require juststeveking/laravel-redoc. Laravel's package auto-discovery registers the service provider, so no manual provider entry is needed. Then publish the config file and point it at your OpenAPI or Swagger document to get a working docs page.
- Which Laravel and PHP versions does laravel-redoc support?
- Check the composer.json constraints on the package repository against your app's Laravel and PHP versions before installing, since the package targets a specific support window. Because it is a thin rendering layer with one service provider, a config file, and a Blade view, it has very few moving parts that could conflict with your framework version. If you are on an older Laravel release, verify the constraint explicitly rather than assuming compatibility.
- How do I point laravel-redoc at my OpenAPI or Swagger spec?
- The package renders a Redoc view against a spec location defined in its published config. You can reference a local YAML or JSON file kept in your repository, or a remote URL that serves the spec. Set the path in the config, clear your config cache, and reload the docs route.
- Can I change the route or URL where the API docs are served?
- Yes. The route and the underlying view are both configurable, which is why the package publishes its config. You can move the docs off the default path, for example to /api/docs or an internal-only prefix, and customize the Blade view if you need your own branding or layout.
- Does laravel-redoc work in production with config:cache and route:cache?
- It should, but this is the classic failure point for config-driven view packages, so verify it explicitly. After configuring the route and spec path, run php artisan config:cache and php artisan route:cache in a staging environment and load the docs page. Never read config values at runtime in a way that bypasses the cache, and re-run the cache commands as part of your deploy pipeline.
- Is the Alfred AI assistant in version 2.1.0 enabled by default?
- Version 2.1.0 is an additive, opt-in release that adds an embedded Alfred AI assistant, but you should confirm the default in the published config before deploying. Treat it as default-off and enable it explicitly per environment, never implicitly in production. Enabling it injects a third-party script, which means documentation content and user queries may leave the browser, so it needs a privacy and legal review first.
- Does laravel-redoc work with a strict Content Security Policy?
- ReDoc is loaded from a CDN, so your script-src and connect-src directives must allow that origin or the docs page will render blank. If Alfred is enabled, the vendor script needs to be allowed as well, and it may require a CSP nonce. For tight policies, consider self-hosting the ReDoc bundle under your own domain instead of relying on the CDN.
- How does laravel-redoc compare to l5-swagger, Scribe, or Scramble?
- laravel-redoc is only a rendering layer: it takes an OpenAPI or Swagger spec you already produce and serves it through Redoc. l5-swagger, Scribe, and Scramble generate or annotate specs and often bundle their own UI, so they solve adjacent problems. If you already emit a spec, this package is the smallest possible docs surface; running two docs UIs is a product decision, not a technical one.
- Is laravel-redoc actively maintained and is it risky to depend on?
- It is a small, single-maintainer package with a modest star count and no dependents, so treat it as a dependency of record with a named owner and a support window. The mitigating factor is near-zero lock-in: the exit cost is deleting a route and a config file. You can also vendor or fork the view if you need long-term guarantees, and pin the version in Composer to control upgrades.
- Should I use laravel-redoc for authenticated or internal API documentation?
- The package is designed as a reference docs surface for endpoints, schemas, examples, and auth descriptions, not a full developer portal with multi-spec catalogs, key issuance, or analytics. For internal-only docs, protect the route with your own middleware or restrict it at the network level, since the package itself adds none. If you need authenticated, per-user documentation experiences, plan on extending the route and view yourself.