PHPackages                             petebishwhip/laradocs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. petebishwhip/laradocs

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

petebishwhip/laradocs
=====================

Maintain beautiful, version-controlled documentation alongside your Laravel codebase. Markdown in, a polished docs site out.

v1.0.0(3w ago)1037.0k↑500.3%5[2 issues](https://github.com/PeteBishwhip/laradocs/issues)[1 PRs](https://github.com/PeteBishwhip/laradocs/pulls)MITPHPPHP ^8.3CI passing

Since Jun 3Pushed 6d agoCompare

[ Source](https://github.com/PeteBishwhip/laradocs)[ Packagist](https://packagist.org/packages/petebishwhip/laradocs)[ Docs](https://github.com/petebishwhip/laradocs)[ GitHub Sponsors](https://github.com/PeteBishwhip)[ RSS](/packages/petebishwhip-laradocs/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (32)Versions (27)Used By (0)

Laradocs
========

[](#laradocs)

[![tests](https://github.com/PeteBishwhip/laradocs/actions/workflows/tests.yml/badge.svg)](https://github.com/PeteBishwhip/laradocs/actions/workflows/tests.yml)[![quality](https://github.com/PeteBishwhip/laradocs/actions/workflows/quality.yml/badge.svg)](https://github.com/PeteBishwhip/laradocs/actions/workflows/quality.yml)[![Latest Version](https://camo.githubusercontent.com/de092c7219231bff9cb30fd38818cead7842caa62fa823019112346ca604adca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065746562697368776869702f6c617261646f63732e737667)](https://packagist.org/packages/petebishwhip/laradocs)[![Total Downloads](https://camo.githubusercontent.com/3f83cd340f73242c038403c4e9e4e7765eaf4b5c9fd63da504673e6d9349be01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7065746562697368776869702f6c617261646f63732e737667)](https://packagist.org/packages/petebishwhip/laradocs)[![License](https://camo.githubusercontent.com/f68e0cc3246eeeda2d6a8c9d174428021d596cd73707c7d8cb46b81576e357a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7065746562697368776869702f6c617261646f63732e737667)](LICENSE.md)

Maintain beautiful, version-controlled documentation **inside** your Laravel codebase. Write markdown, commit it next to the code it describes, and Laradocs serves a polished docs site at `/docs` (or wherever you like).

```
composer require petebishwhip/laradocs
php artisan laradocs:install
```

Then open `/docs`.

Requirements
------------

[](#requirements)

MinimumNotesPHP8.38.4 and 8.5 fully supportedLaravel11.1412 and 13 fully supporteddedoc/scramble0.13Optional — only needed for the `scramble` OpenAPI driverFeatures
--------

[](#features)

- 📁 **Multi-level file structure** — nested folders become nested navigation.
- 🔗 **Filename *or* metadata routing** — `slug:` front-matter overrides paths.
- 📝 **Markdown → HTML** powered by CommonMark (GFM, tables, footnotes, …).
- 🏷️ **Rich per-file metadata** — `title`, `description`, `order`, `hidden`, `group`, `badge`, `redirect`, `tags`, and more.
- 🎨 **Polished default UI** — responsive, dark-mode, sidebar, breadcrumbs, on-page table of contents, prev/next — all publishable and overridable.
- ⚡ **Smart caching** — rendered HTML cached and auto-invalidated on file change.
- 🧩 **Variables &amp; macros** — interpolate `{{ values }}` and reuse `@docs()` blocks, with a service-provider API to register your own.
- 🖼️ **Rich content** — callouts (`> [!NOTE]`), syntax-highlighted code with a copy button, lazy images with captions, and local/YouTube/Vimeo video embeds.
- 🔎 **Automatic SEO** — ``, meta description, Open Graph &amp; Twitter cards, canonical URLs and JSON-LD for every page, with per-page front-matter overrides.
- 🗺️ **Sitemap** — an auto-generated `sitemap.xml` at `{prefix}/sitemap.xml`, cached and invalidated alongside the rest of the docs cache.
- ✅ **Fully tested** — Pest + Testbench, 100% coverage gate, PHPStan &amp; Psalm max, Pint.

Quick start
-----------

[](#quick-start)

Create a page:

```
php artisan make:doc guide/getting-started --title="Getting Started" --order=1
```

```
---
title: Getting Started
description: Install and configure the app.
order: 1
group: Basics
---

# Getting Started

> [!TIP]
> Folders become sidebar sections; `_index.md` is a section's landing page.
```

Configuration
-------------

[](#configuration)

Everything is configurable in `config/laradocs.php` and via environment variables — route prefix/domain, docs path, routing strategy, theme, caching and more. See the [Configuration docs](https://laradocs.dev/docs/configuration).

```
LARADOCS_ROUTE_PREFIX=docs
LARADOCS_THEME=auto
LARADOCS_ENABLED=true
```

The Laradocs facade
-------------------

[](#the-laradocs-facade)

```
use Laradocs\Facades\Laradocs;

Laradocs::variables(fn () => ['version' => '1.0.0']);
Laradocs::share('app_name', config('app.name'));
Laradocs::macro('tweet', fn (array $args) => "@{$args['user']}");
```

Artisan commands
----------------

[](#artisan-commands)

CommandDescription`laradocs:install`Publish config and scaffold a starter page`make:doc {name}`Scaffold a new markdown page with front-matter`laradocs:cache`Pre-render and cache every page`laradocs:clear`Clear the documentation cache`laradocs:openapi`Generate an OpenAPI spec from your routes (`--driver=auto|native|scramble`)Publishing
----------

[](#publishing)

```
php artisan vendor:publish --tag=laradocs-config
php artisan vendor:publish --tag=laradocs-views
php artisan vendor:publish --tag=laradocs-assets
php artisan vendor:publish --tag=laradocs-lang
```

Testing
-------

[](#testing)

```
composer test
```

Local development (workbench)
-----------------------------

[](#local-development-workbench)

The package ships an [orchestra/testbench](https://packages.tools/testbench)**workbench** — a disposable Laravel app used to run Laradocs as a real, browsable site while you work on the package itself, rather than through Pest alone.

```
composer serve
```

This builds the workbench (`testbench workbench:build`) and boots it at `/docs`. The generated app lives at `vendor/orchestra/testbench-core/laravel`— it's regenerated on demand and isn't committed to git.

**By default the workbench has no docs content**, so `/docs` renders an empty state. Point it at the real docs in this repo (so edits under `docs/` show up immediately, thanks to Laradocs' mtime-based cache) by adding to the workbench's `.env`:

```
# vendor/orchestra/testbench-core/laravel/.env
LARADOCS_PATH=/absolute/path/to/laradocs/docs
```

Or seed your own throwaway fixtures directly under the workbench's `docs/`and `lang/vendor/laradocs//` — useful for exercising a specific feature (a locale, a version, a front-matter combination) without touching the real docs. Any `config/laradocs.php` option can be set via the workbench's own `.env`, exactly as in a consumer app — e.g. `LARADOCS_LOCALE_AVAILABLE={"en":"English","fr":"Français"}` to test localisation.

For finer control than `composer serve` gives you — e.g. driving the app with `curl` instead of a browser — build and serve it yourself:

```
composer run build              # just (re)build the workbench, don't serve
cd vendor/orchestra/testbench-core/laravel
php artisan config:clear        # pick up .env changes — Laravel may have cached the old config
php artisan serve               # or: php -S 127.0.0.1:8000 -t public public/index.php
```

Two gotchas worth knowing:

- **`composer dump-autoload` wipes the workbench.** The package's `post-autoload-dump` hook runs `testbench package:purge-skeleton`, which deletes the generated app — including any `.env` changes or fixtures you added. Re-run `composer run build` (or `composer serve`) afterwards to regenerate it.
- **Config changes need `config:clear`.** After editing the workbench's `.env`, run `php artisan config:clear` inside it if the change doesn't seem to take effect.

Documentation
-------------

[](#documentation)

The full docs live at **[laradocs.dev/docs](https://laradocs.dev/docs)** — and are themselves built with Laradocs. Highlights:

- [Getting started](https://laradocs.dev/docs/getting-started)
- [Configuration](https://laradocs.dev/docs/configuration)
- [Routing](https://laradocs.dev/docs/guide/routing)
- [Metadata](https://laradocs.dev/docs/guide/metadata)
- [Caching](https://laradocs.dev/docs/guide/caching)
- [SEO](https://laradocs.dev/docs/guide/seo)
- [Sitemap](https://laradocs.dev/docs/guide/sitemap)
- [CLI reference](https://laradocs.dev/docs/guide/cli)
- [PHP API](https://laradocs.dev/docs/guide/api)
- [Variables](https://laradocs.dev/docs/features/variables) · [Macros](https://laradocs.dev/docs/features/macros) · [Rich content](https://laradocs.dev/docs/features/rich-content)
- [Customising the UI](https://laradocs.dev/docs/customising-the-ui) · [Customising stubs](https://laradocs.dev/docs/customising-stubs)
- [Migration guide: 0.x → 1.0](https://laradocs.dev/docs/migration-guide)

The source for those pages lives in [`docs/`](docs); browse there or serve a local copy with `composer serve`.

Sponsors
--------

[](#sponsors)

Laradocs is free and open source. If it saves you time, please consider [sponsoring its development](https://github.com/sponsors/PeteBishwhip) — it keeps the project actively maintained.

 [ ![Sponsors of PeteBishwhip](./sponsors.svg) ](https://github.com/sponsors/PeteBishwhip)

The image above is regenerated daily by the [`Scheduler`](.github/workflows/scheduler.yml)workflow via [sponsorkit](https://github.com/antfu/sponsorkit).

Contributing &amp; Security
---------------------------

[](#contributing--security)

See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).

License
-------

[](#license)

The MIT License (MIT). See [LICENSE.md](LICENSE.md).

Star History
------------

[](#star-history)

[    ![Star History Chart](https://camo.githubusercontent.com/76728322ee945d24b5e3fe834c50f2dddab0df314cf76fb0707ff050f366baa5/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f63686172743f7265706f733d5065746542697368776869702f6c617261646f637326747970653d74696d656c696e65266c6567656e643d746f702d6c656674) ](https://www.star-history.com/?repos=PeteBishwhip%2Flaradocs&type=timeline&legend=top-left)

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance97

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

15

Last Release

21d ago

Major Versions

v0.6.1 → v1.0.02026-07-03

PHP version history (2 changes)0.1.0PHP ^8.2

v1.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8aefa1209c2b627a0d61ace3d07f04ab7fc1ae5508d2b0f5164543ed33a2453f?d=identicon)[PeteBishwhip](/maintainers/PeteBishwhip)

---

Top Contributors

[![PeteBishwhip](https://avatars.githubusercontent.com/u/9081809?v=4)](https://github.com/PeteBishwhip "PeteBishwhip (106 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![aikido-autofix[bot]](https://avatars.githubusercontent.com/in/268977?v=4)](https://github.com/aikido-autofix[bot] "aikido-autofix[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

documentationlaravelmarkdownphplaraveldocumentationmarkdowncommonmarkdocs

###  Code Quality

TestsPest

Static AnalysisPHPStan, Psalm, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/petebishwhip-laradocs/health.svg)

```
[![Health](https://phpackages.com/badges/petebishwhip-laradocs/health.svg)](https://phpackages.com/packages/petebishwhip-laradocs)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k86](/packages/moonshine-moonshine)[illuminate/mail

The Illuminate Mail package.

5910.6M528](/packages/illuminate-mail)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
