Documentation

CLI

Every Artisan command shipped by Laradocs.

Laradocs registers four Artisan commands. Run any of them with php artisan {name}.

docs:install

bash
php artisan docs:install [--force]

Publishes config/laradocs.php, ensures docs.path exists, and writes a starter index.md if one isn't already there. Pass --force to overwrite an existing config or starter page.

make:doc

bash
php artisan make:doc {name} \
    [--title=...] [--group=...] [--order=...] [--force]

Scaffolds a new markdown file inside your docs directory. name is the slug-style path you want (e.g. guide/installation or reference/migration.md — the extension is optional).

Option Effect
--title Sets the front-matter title: (defaults to a humanised filename).
--group Sets the front-matter group:.
--order Sets the front-matter order:.
--force Overwrite if the file already exists.

The output is produced from a Blade stub you can publish and edit — see Customising stubs.

docs:cache

bash
php artisan docs:cache

Pre-renders every visible document, warms the cache, and stores the navigation tree. Hooked into Laravel's optimizer, so php artisan optimize calls it automatically.

docs:clear

bash
php artisan docs:clear

Flushes all cached HTML and the navigation tree. Hooked into php artisan optimize:clear.

Tip

Editing a file invalidates only that file's cache (keyed on mtime), so during development you can leave the cache enabled and still see changes immediately.