Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Render Widget Laravel Package

friendsofvictoire/render-widget

A lightweight Laravel package for rendering reusable widgets in your views. Register widgets and output them through a simple API, keeping Blade templates clean, modular, and easy to maintain. Suitable for dashboards, modular layouts, and component-driven pages.

View on GitHub
Deep Wiki
Context7

Getting Started

First, a reality check: friendsofvictoire/render-widget is a Symfony bundle (WidgetRenderBundle) for Victoire DCMS, not a Laravel package. It ships a WidgetRenderer service wired into Victoire's widget component pipeline (Twig rendering, widget slot resolution, and DCMS block composition). The namespace and Bundle suffix follow Symfony bundle conventions — there is no RenderWidgetServiceProvider, no config/render-widget.php, and no Laravel service container integration.

Minimal steps a Laravel developer would take:

  1. composer require friendsofvictoire/render-widget and confirm which Victoire/victoire/widget version you get — the bundle is coupled to Symfony and Victoire internals.
  2. Look first at the bundle's Resources/config/services.yml and the WidgetRenderer class. That's the whole surface area: it takes a widget/slot and returns rendered HTML.
  3. First real use case is not "render a widget in Blade." It's "render a Victoire CMS widget" inside an existing Victoire/Symfony application.

Bottom line for a Laravel app: this package has 0 stars, 0 dependents, and no Laravel bridge. Unless you are maintaining a Victoire DCMS site, you do not gain day-to-day leverage from it. If you do have a Victoire site and a Laravel admin/API on the side, treat it as a Symfony-side rendering dependency, not something you call from Laravel.

Implementation Patterns

If you're inside Victoire/Symfony (the intended environment):

  • Register the bundle in AppKernel/bundles.php and let Victoire's widget dispatcher use WidgetRenderer automatically — don't instantiate it by hand, inject it.
  • Render widgets in Twig via Victoire's widget functions rather than calling the renderer directly; the bundle expects Victoire's widget context (slot, view reference) to be present.
  • Keep widget templates in the bundle's expected Resources/views path so the renderer's lookup works.

If you're in Laravel and need to consume widget output:

  • Do not try to boot the bundle in Laravel. Instead, expose a rendered widget over HTTP from the Victoire app (a simple controller returning the renderer output) and fetch it in Laravel with Http::get(...). Cache the HTML per widget/slot key in Laravel to avoid cross-framework round-trips on every request.
  • If you must share templates, mirror the Victoire widget markup in Blade partials and pin the Victoire widget version so markup doesn't drift.
  • For headless/API scenarios, render the widget server-side in Victoire and return HTML or serialized widget data; let Laravel handle presentation.

Integration tips:

  • Pin the exact Victoire version in composer.json (victoire/widget etc.) — the renderer's contract is tied to Victoire's widget model.
  • Wrap any rendering call in a try/catch that degrades to a placeholder widget; a missing slot shouldn't 500 the page.

Gotchas and Tips

  • Framework mismatch is the headline gotcha. A Laravel developer installing this expecting Blade integration will find Symfony DI, Symfony events, and Victoire-specific abstractions. Budget time to read the bundle source (it's small) before assuming behavior.
  • No service provider / no facade. You can't app(WidgetRenderer::class) from Laravel — the class relies on Symfony services. Bridging it means manual wiring or the HTTP approach above.
  • Abandonment risk. With 0 stars and 0 dependents, assume no upstream fixes. Fork it into your repo (or vendor it) before shipping to production, and record why you took the dependency in your ADR.
  • Debugging: if a widget renders blank, check (1) the widget is registered with Victoire's widget registry, (2) the template path resolves in Resources/views, (3) the renderer received a non-null slot. Log the widget identifier at the call site — the bundle's own exceptions are generic.
  • Config quirks: bundle config lives under Victoire's config tree, not a standalone render_widget key. Don't expect a config/render-widget.php file.
  • Extension points: the renderer is the seam — decorate/subclass it if you need to post-process HTML (e.g., strip scripts for an API), rather than editing the bundle in place.
  • When to skip it entirely: if you're building a Laravel app with no Victoire backend, this package is not for you. Use a Blade component or Livewire widget instead; you'll save yourself a framework-adapter rabbit hole.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names