spatie/laravel-markdown-blade-component
Spatie's Laravel Markdown Blade Component lets you render Markdown directly in Blade views using a simple component. Built on CommonMark, it supports GitHub-flavored Markdown, caching, and safe HTML output, making it ideal for blogs, docs, and user-generated content.
Architecture fit
<x-markdown>) wrapping league/commonmark with a config file. It occupies the "render markdown to HTML" slot in the stack and touches nothing else — no persistence, no routing, no auth. Architectural blast radius is therefore small, which is exactly what you want from a utility dependency.laravel-markdown or client-side libraries are the natural adopters.spatie/shiki-php — this shells out to a Node.js process at render time. That pulls a non-PHP runtime into the request path (or the queue, or the build), which is the single most consequential design decision in this package.Integration feasibility
vendor:publish of the config. No schema changes, no migrations, no new services if code highlighting is disabled.Technical risk
html_input is left permissive and output is not sanitized. If any rendered markdown is user-authored, this needs an explicit policy decision (escape/strip raw HTML, or sanitize the rendered output with a purifier) plus tests, before it ships.node on PATH). This is a common source of "works locally, breaks in the container" incidents, and it is incompatible with some serverless/FaaS runtimes out of the box.league/commonmark.Key questions
html_input / output sanitization?Stack fit
Migration path
{!! Markdown::convert($text) !!} call with <x-markdown>{{ $text }}</x-markdown> and the surrounding view is unchanged.Compatibility
Sequencing
Maintenance
Support
league/commonmark), that is a reasonable trade — but it means we own the diagnosis when something breaks.Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?