- What is pxlrbt/laravel-docs used for?
- It adds a lightweight, self-hosted documentation site to an existing Laravel application. You drop Markdown files into a configured source path and the package handles routing, parsing, and rendering through a Blade-powered layout. It is aimed at guides, API references, and internal notes that should live inside your app instead of a separate CMS or external docs service. Because it registers a normal Laravel route, it inherits your app's middleware, auth, and layout.
- How do I install pxlrbt/laravel-docs in a Laravel app?
- Install it with Composer using composer require pxlrbt/laravel-docs, then publish the package's config and Blade views with the vendor:publish command for the package's service provider tags. After publishing, point the source path in the config at your Markdown directory and set the route prefix you want. Installation is a require plus a publish; the real work is deciding your source model, access control, and view ownership. Verify against the pinned tag in vendor/pxlrbt/laravel-docs, since the published material describes both a Markdown renderer and a class-reflection generator.
- Does pxlrbt/laravel-docs require a database or external service?
- No. The package reads Markdown from a configured path and renders it through Blade, so there is no migration, no new persistence layer, and no third-party API dependency. That also means there is nothing to back up beyond your own Markdown files. Front matter is parsed with symfony/yaml, which is a Composer dependency rather than a service you have to run.
- How do I change the documentation URL prefix and navigation order?
- Both are handled in the published config file: set the route prefix, the Markdown source path, and the middleware to apply, then define your navigation entries. Ordering is controlled through the config navigation plus YAML front matter in the Markdown files, so pages can be grouped and sequenced without touching code. Since the config is published into your app, the values are version-controlled alongside everything else.
- How do I protect the documentation behind authentication or middleware?
- Set the middleware in the package config to your auth or gate middleware, for example auth or a custom middleware group, rather than relying on a hard-to-guess URL prefix alone. A prefix is not access control, so treat this as a required first-commit step, not a later hardening task. Because the docs route is a normal Laravel route, any middleware you already use for internal pages applies unchanged.
- Can I customize the docs design with my own Blade views?
- Yes. The package ships publishable Blade views, so you can publish them into resources/views and edit the layout, partials, and styling directly. Most teams extend their existing application layout so the docs match the rest of the product. Committing the published views keeps design changes reviewable instead of hidden inside the vendor directory.
- Should I store Markdown in my repository or fetch it from a remote source?
- Local, committed Markdown is the safer default: it is versioned with your code, reviewed in pull requests, and has no runtime dependency. Remote fetching introduces failure modes, including an unauthenticated GitHub budget of roughly 60 requests per hour per IP, which can turn into a blank page behind shared NAT with a cold cache on deploy. Unless you specifically need docs updated independently of deploys, vendor the files and skip the network.
- Is it safe to ship pxlrbt/laravel-docs to production?
- The code risk is low, but the route risk is real: if the service provider registers the docs route unconditionally, the URL exists in production before you attach authentication. Confirm on install whether registration is unconditional and what the default middleware is when none is configured, then close that gap immediately. The bigger long-term risk is stewardship, since this is a single-maintainer package with a small star count and no dependents, so consider a thin DocsRenderer-style abstraction in your own code to keep a future replacement cheap.
- Does pxlrbt/laravel-docs support full-text search, versioned docs, or translations?
- No. The capability ceiling is intentionally small: there is no built-in full-text search, no versioned documentation hosting, no i18n workflow, no editorial approval pipeline, and no content API. Teams that need search typically add a client-side search library on top of the rendered pages. If versioned or multilingual docs are hard requirements, this package is a starting point rather than a complete docs platform.
- Is pxlrbt/laravel-docs actively maintained, and how do I test it?
- It is a small, personal-scale project with one maintainer, a handful of GitHub stars, and the most recent headline change being a first-time contributor's dependency-widening pull request, so plan for the possibility you fork or replace it. Test it with a standard Laravel feature test that hits the docs route and asserts a 200 response plus expected rendered content, including a request without credentials to confirm your middleware blocks it. Given the low installation cost, a short spike on the pinned version is the fastest way to confirm behavior before committing to it.