vedmant/laravel-shortcodes
Add WordPress-style shortcodes to your Laravel app. Register custom tags with attributes, parse them in Blade views or any content, and render dynamic output cleanly. Lightweight and easy to extend, ideal for CMS-like content and reusable snippets.
[video id="42"], [cta url="/pricing"]) inside stored rich text without a developer shipping a release. If your roadmap includes marketing pages, a blog, docs, email templates, or any editor-managed copy, this is the cheapest way to prototype that capability.[order_id]-style tokens. This shifts template changes from engineering tickets to operations, which is a measurable support-cost lever.Adopt when:
Look elsewhere when:
Blade::render and skip the abstraction entirely.league/commonmark with custom extensions is better maintained, better specified, and has a real security posture.To executives: This is a small, free, MIT-licensed library that lets non-engineers edit parts of the product's content — marketing pages, help articles, email templates — without filing engineering tickets. It buys us speed on a content-driven feature without committing to a CMS platform. The tradeoff: it is a low-adoption package last updated in early 2023, so we would copy the code into our repository and own it rather than depend on the author. Cost is roughly a few engineering days; the alternative (a full CMS or a bespoke editor) is weeks to months.
To engineering: Treat it as a parser we fork, not a dependency we install and forget. Scope it to an explicit allowlist of shortcodes, register handlers ourselves, escape all interpolated output, and add tests for nesting, unknown tags, and malformed attributes before it touches anything user-facing. If the requirement grows past flat inserts, we stop extending it and revisit the CMS decision.
How can I help you explore Laravel packages today?