New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

foxws/laravel-docs

Pull a package's docs/*.md folder from GitHub or a local folder into queryable Eloquent models.
1,006 1
Install
composer require foxws/laravel-docs
Latest Version:v1.8.2
PHP:^8.3
Laravel:12 · 13
License:MIT
Last Updated:Oct 14, 2026
Links: GitHub  ·  Packagist
Maintainer: francoism90

Laravel Docs

Packagist PHP from Packagist GitHub Workflow Status (main) Total Downloads

Pulls a package's docs/*.md folder from GitHub or a local folder into queryable Eloquent models — no bundled frontend or theme. The consuming application owns all rendering; this package is just the data layer.

Installation

You can install the package via Composer:

composer require foxws/laravel-docs

You may publish all of the package's resources at once:

php artisan vendor:publish --tag="docs"

Or, you may publish each resource individually:

Publishing the Configuration File

php artisan vendor:publish --tag="docs-config"

Publishing and Running the Migrations

Migrations run automatically without publishing, but they can still be published (and customized):

php artisan vendor:publish --tag="docs-migrations"
php artisan migrate

[!WARNING] This package creates its own projects, versions, and documents tables via loadMigrationsFrom(). Don't add your own migrations for tables with these names — doing so will fail with a "relation already exists" error when both run. If you need custom columns, publish and edit these migrations instead (see above).

[!TIP] Let your AI agent do the hard parts. This package ships a Laravel Boost skill, docs-development, that teaches your agent how to install, configure and use Laravel Docs. Install Boost and select the skill when prompted:

composer require laravel/boost --dev
php artisan boost:install

Already using Boost? Run php artisan boost:update --discover to pick up the skill. Then just ask, for example: "Register foxws/laravel-ddd as a project and sync its docs every day."

Usage

Register a project and at least one version, then sync its documentation from GitHub:

php artisan docs:projects:add laravel-podman "Laravel Podman" --github=foxws/laravel-podman
php artisan docs:versions:add laravel-podman latest main --default
php artisan docs:sync
use Foxws\Docs\Models\Project;

$project = Project::where('slug', 'laravel-podman')->firstOrFail();
$version = $project->versions()->where('is_default', true)->firstOrFail();
$document = $version->documents()->where('slug', 'installation')->firstOrFail();

$document->resolveSeoTitle(); // "Installation — Laravel Podman — Foxws"

Document::body stores the raw markdown pulled from GitHub — nothing is pre-rendered at sync time, so you're free to render it however you like. Call $document->toHtml() for a GitHub-flavored, HTML-stripped, unsafe-link-free HTML string (tune the markdown options via docs.markdown.options); the result is cached per document, keyed by its blob_sha, so it re-renders automatically only when docs:sync pulls new content. Pass toHtml(shouldCache: false) to skip the cache, and tune it (or turn it off entirely) via the docs.cache config.

Callout blocks are supported too. A :::note, :::tip, :::warning (or any :::type) line opens one, an optional title can follow the type (:::warning Breaking change), and a ::: line closes it. They render as <div class="callout callout-{type}" data-callout="{type}">, with a <p class="callout-title"> when a title is given. GitHub's alert syntax renders the same way, so docs written for GitHub need no changes: a blockquote whose first line is [!NOTE], [!TIP], [!IMPORTANT], [!WARNING] or [!CAUTION] becomes a callout of that type. No styles ship with the package, so style them in your app.

Document also implements Htmlable, so {{ $document }} in a Blade view renders its HTML unescaped, the same as calling {!! $document->toHtml() !!}.

See the documentation for configuration, registering projects and versions, scheduling syncs, and search.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Laravel Docs! Please review our contributing guide to get started.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Laravel Docs is open-sourced software licensed under the MIT license.

Related Packages

dniccum/nova-documentation

A Laravel Nova tool that allows you to add markdown-based documentation to your...

127,096 37
pxlrbt/laravel-docs

Render markdown documentation inside Laravel with a modern VitePress-inspired la...

2,218 4
codex/core

The core package for Codex. This is the minimal requirement to get Codex up and...

217 0
petebishwhip/laradocs

Maintain beautiful, version-controlled documentation alongside your Laravel code...

77,231 138
lynkbyte/docs-builder

A Laravel-powered static documentation site generator that compiles Markdown and...

1,963 1

Version History

Version Released PHP Laravel License
v1.8.2 ^8.3 ^12.0|^13.0 MIT
v1.8.1 ^8.3 ^12.0|^13.0 MIT
v1.8.0 ^8.3 ^12.0|^13.0 MIT
v1.7.0 ^8.3 ^12.0|^13.0 MIT
v1.6.0 ^8.3 ^12.0|^13.0 MIT