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

Faq Widget Laravel Package

friendsofvictoire/faq-widget

A ready-to-drop-in FAQ widget for Laravel applications. Render question-and-answer lists as clean, collapsible accordion panels, with simple configuration and Blade integration so you can add a searchable, styled FAQ section to any page in minutes.

View on GitHub
Deep Wiki
Context7

Getting Started

This is not a Laravel package. friendsofvictoire/faq-widget is a Symfony bundle for Victoire DCMS, a Symfony 2/3-era CMS. There is no service provider, no facade, and no config/ file you can publish into a Laravel app. If you are on Laravel, the only honest first step is to decide between (a) reimplementing a simple FAQ accordion in Blade + Livewire/Alpine, or (b) standing up a separate Victoire/Symfony application. Everything below assumes you are actually running Victoire.

Minimal steps:

  1. composer require friendsofvictoire/faq-widget in the Victoire/Symfony project.
  2. Register the bundle in app/AppKernel.php (new Victoire\Widget\FAQBundle\VictoireWidgetFAQBundle()), matching the namespace declared in the bundle's composer.json.
  3. Clear cache and rebuild assets (php app/console cache:clear, assetic:dump/assets:install depending on your setup).
  4. In the Victoire back office, open a page template, drag the FAQ widget into a slot, fill in the question/answer pairs, and save.

Where to look first:

  • Widget/*.php — the widget model (the persisted fields) and its form type.
  • Resources/views/ — the Twig template that actually renders the FAQ on the front end. This is where you will spend 90% of your time.
  • Resources/config/ — service definitions and any Victoire widget registration/annotation configuration.

First use case: a static FAQ/help accordion on a "Support" business page, edited by content editors rather than developers. That is the entire value proposition of the bundle.

Implementation Patterns

Edit the rendering template, not the widget class. Victoire widgets are small: a model with a handful of fields, a Symfony form type, and a Twig view. Day-to-day work is restyling the output to match the project's Bootstrap/Foundation/Zurb theme. Typical shape:

{% for item in widget.items %}
    <div class="panel panel-default">
        <div class="panel-heading">{{ item.question }}</div>
        <div class="panel-body">{{ item.answer }}</div>
    </div>
{% endfor %}

If the widget stores a collection, the form type will use a CollectionType with allow_add/allow_delete; check the form type before assuming field names (question/answer vs title/content).

Override the template from your application bundle. Do not fork the vendored package. Copy the template into your own bundle's Resources/views/ using the standard Symfony bundle override path (app/Resources/VictoireWidgetFAQBundle/views/...) and adjust the markup there. This keeps composer update safe (though with a 2016 package, updates are unlikely).

Wire it into page templates, not individual pages. In Victoire, widgets live in slots on business page templates. Create the FAQ slot once on the template, then editors populate it per page. This is the intended workflow and avoids re-adding the widget on every page.

Style consistently with the rest of the CMS. Victoire renders other widgets around yours, so match their class conventions (panels, faq-item, etc.) rather than introducing a new CSS framework. If the project uses Assetic or Webpack Encore, add your FAQ styles there instead of inline <style>.

If you need more fields (categories, ordering, an "updated at" date), extend the widget's form type and model in a local fork. Given the bundle has zero dependents and one star, forking is a realistic option — you are the only consumer. Prefer a fork over hoping for upstream patches.

Gotchas and Tips

  • Abandoned and unmaintained. Last release August 2016, one star, zero dependents. It targets Symfony 2.x/3.x and PHP 5.x/7.0. It will not install cleanly on modern Symfony (5/6/7) or PHP 8. If you are evaluating it for a new project, treat it as a code sample to crib from rather than a dependency.
  • Laravel confusion. friendsofvictoire/* naming and the presence of a composer.json make it look framework-agnostic. It isn't; it depends on Victoire's WidgetBundle, the @VictoireWidget annotation/registration mechanism, and Victoire's slot rendering. There is no Laravel bridge and no realistic way to shoehorn one in.
  • Widget not appearing after install. Almost always one of: bundle not registered in AppKernel, cache not cleared, or the widget registration/config not picked up. Clear cache and check the Victoire widget list in the back office before debugging Twig.
  • Escaping/XSS. Answers are often edited through a rich-text/WYSIWYG field. If the template prints with |raw to preserve formatting, validate that the editor role is trusted. On Symfony 2/3 the default autoescape is on, so confirm what the template actually does before assuming it is safe or unsafe.
  • Assets and stale caches. 2016-era Symfony asset tooling (Assetic) caches aggressively. If your template changes don't show, it's the asset dump or the Twig cache, not the widget.
  • Debugging. Use the Symfony profiler and app/logs/; set twig.debug in dev. There is essentially no community to search — GitHub issues on a one-star repo from 2016 will not help, so read the source directly.
  • Extension points to prefer over patching. Template override is the clean lever. If you need behavior changes, decorate/extend the widget class in your own bundle, or (better) write a fresh Victoire widget modeled on this one — the boilerplate is small enough that a clean implementation is usually less work than fighting an abandoned dependency.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package