- How do I install Laraberg in a Laravel application?
- Install Laraberg with Composer using composer require van-ons/laraberg, then publish its configuration and compiled assets with vendor:publish. Include the package CSS and JavaScript in your admin layout only, and mount the editor on a form field using the package's Blade directive or documented JavaScript API. The quickest path is a Blade or Livewire admin form backed by a model column that stores the block content.
- Which Laravel and PHP versions does Laraberg support?
- Laraberg is best suited to Laravel 9 and 10 with Blade or Livewire admin screens and server-rendered public pages. The package's last release was January 2023, so Laravel 11 and 12 plus PHP 8.3 and 8.4 are not officially covered by that release. Pin the package version, the bundled Gutenberg build, and your PHP and Laravel minors, then test upgrades explicitly.
- Is Laraberg's GPL-3.0 license a problem for commercial projects?
- Laraberg inherits GPL-3.0 from the Gutenberg editor, so a distributed or on-prem proprietary product carries copyleft exposure that needs legal sign-off. For an internal tool or self-hosted SaaS the risk is lower, but the compiled JavaScript still ships to browsers. Treat the license as a gate in your evaluation, not a footnote.
- Can I use Laraberg with Inertia.js, Vue, or React?
- Laraberg is a poor fit for Inertia.js, Vue, or React SPAs because it bootstraps Gutenberg through global script tags and expects a WordPress-like wp.data and REST runtime. It works best when mounted inside a Blade or Livewire admin page where the editor owns a stable DOM node. If you must use an SPA, budget time for careful mounting, unmounting, and CSS isolation.
- How do I render Gutenberg block content on the server side in Laravel?
- Store the editor's block JSON as the source of truth and also persist the rendered HTML so public pages do not need to parse blocks on every request. Use the package's server-side rendering path or your own renderer, and validate it against Gutenberg block deprecations so saved posts do not trigger invalid-content warnings. Sanitize the rendered HTML before output and cache it alongside the JSON.
- Is Laraberg safe for user-generated content, or is XSS a risk?
- Yes, XSS is a real concern because block content is user-controlled HTML and unescaped rendering creates a stored-XSS vector. Sanitize rendered block markup with a strict HTML purifier, restrict which blocks and capabilities editors can use, and never trust the editor output as safe. Treat the JSON as untrusted input too, because it can contain HTML attributes and URLs.
- Does Laraberg support media uploads and the WordPress media library?
- Laraberg does not provide the full WordPress media library or its REST endpoints, so you must implement upload endpoints, storage, and media block handling in your Laravel app. Blocks that depend on WordPress core-data post entities or the media library may fail or degrade. Plan the media pipeline before calling the editor production-ready.
- Which Gutenberg blocks actually work in Laraberg?
- Basic blocks such as paragraphs, headings, lists, images, and quotes are the realistic target for a Laraberg integration. Blocks that depend on post entities, the media library, reusable blocks or patterns, Query Loop, or Site Editor concepts will fail, error, or degrade because Laraberg only shims a subset of the WordPress runtime. Scope the required block set with product owners before building.
- Is Laraberg actively maintained and production-ready?
- Laraberg's last release was January 2023, it has a single maintainer and zero Packagist dependents, so 1.4k GitHub stars indicate popularity rather than active maintenance. The frozen Gutenberg bundle means a frozen block set and a growing gap with newer Laravel and PHP releases. Treat the repository as a starting point to fork and budget for a trustworthy renderer, sanitization, media handling, and a round-trip-safe content model.
- How do I migrate existing Trix, Markdown, or HTML content to Laraberg?
- Add a content_blocks JSON column as the new editor source of truth while keeping the existing rendered HTML column until the renderer is validated. Write a one-shot Artisan command to convert Markdown, Trix, or plain HTML bodies into block HTML, snapshot the database, and dry-run against a representative content sample. Roll out behind a feature flag with a per-form fallback to the legacy editor so you can revert without data loss.