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

Card Widget Laravel Package

friendsofvictoire/card-widget

A lightweight Laravel package from FriendsofVictoire that provides a reusable card widget for consistent list cards and search results. It offers Blade-friendly rendering and customizable presentation for titles, descriptions, and metadata, helping you display structured content without duplicating...

View on GitHub
Deep Wiki
Context7

Getting Started

Before anything else: this is not a Laravel package. friendsofvictoire/card-widget (repository name WidgetCardBundle) is a Symfony bundle that registers a "Card" content widget inside Victoire DCMS, a Symfony-based CMS. There is no service provider, no facade, no config file Laravel can load, and no view namespace Laravel can resolve. composer require friendsofvictoire/card-widget in a laravel new project will either fail on Symfony 2/3 constraints or install a bundle that nothing autoloads.

So "getting started" splits into two paths:

Path A — you are actually working in a legacy Victoire/Symfony site.

  1. Confirm the Symfony version. Last release is 2016-08-22, which puts it in the Symfony 2.7–3.0 era. Check composer.json constraints before assuming it will install.
  2. composer require friendsofvictoire/card-widget and register FriendsOfVictoire\Bundle\WidgetCardBundle\WidgetCardBundle in AppKernel.php.
  3. Open the page editor in Victoire; the Card widget should appear in the widget picker under the FriendsOfVictoire group.
  4. Read the widget class under Widget/, the Twig template under Resources/views/, and the form type under Form/ — those three files are 90% of the bundle.

Path B — you are a Laravel developer evaluating this for a Laravel project. Skip it. The feature it provides is "a card with an image, heading, body, and link that an editor can drop onto a page." In Laravel that is a Blade component:

// app/View/Components/Card.php
class Card extends Component {
    public function __construct(
        public ?string $image = null,
        public ?string $title = null,
        public ?string $url = null,
    ) {}
}
{{-- resources/views/components/card.blade.php --}}
<article class="card">
  @if($image)<img src="{{ $image }}" alt="">@endif
  <h3>{{ $title }}</h3>
  <div>{{ $slot }}</div>
  @if($url)<a href="{{ $url }}">Read more</a>@endif
</article>

That is the entire "package." You will write it in ten minutes and own it forever, on a supported stack.

Implementation Patterns

If maintaining the Victoire bundle:

  • The widget is declared as a service tagged for Victoire's widget registry. If it doesn't appear in the editor, the tag or the VictoireWidget interface is missing — check Resources/config/services.yml first.
  • Override the rendering template by copying Resources/views/*.html.twig into your app's template path (app/Resources/WidgetCardBundle/views/ for Symfony 2/3). Never edit vendor files; the bundle is unmaintained.
  • Override the editor form by extending the bundle's form type and re-registering the service, rather than patching in place.
  • Because the bundle is pinned to 2016 Symfony, expect to also pin the rest of the app. Do not try to mix it with a Symfony 4+ project.

The Laravel patterns that actually replace this package:

  • Static cards in a template — anonymous Blade component with slots, as above. Use this when content is developer-authored.
  • Editor-managed cards — a blocks table with type, sort_order, and a payload JSON column; a BlockRenderer service that maps type => view; a Filament/Nova field for the payload. Cards become one type among many (hero, text, quote, CTA).
  • Cards as first-class models — a cards table with a cardable polymorphic relation to Page/Post. Better if cards are reused across pages or need their own URLs and media.
  • Content blocks via a JSON column on pages — pages.content cast to array, rendered with a @foreach and a match on block type. Fastest to ship, worst to query against later.
  • Admin editing — Livewire component with wire:model on a blocks array, or a Filament Repeater on the JSON column. This is where 80% of the effort goes, not in the markup.

Integration tips:

  • If you're porting an existing Victoire site to Laravel, treat the Card widget as a specification, not a dependency. Scrape the rendered output or the widget's Twig template to learn the expected fields and markup, then reimplement the markup in Blade so visual parity holds.
  • Put card variants (image-left, image-top, compact) in a variant prop and a match in the component, rather than three separate components. The bundle does not support variants; you'll want them.

Gotchas and Tips

  • Unmaintained since 2016. No PHP 8, no Symfony 5+, no security patches, no maintainer response. 2 stars and 0 dependents means there is no community to ask when it breaks.
  • Not a Laravel package. This is the single biggest gotcha. Any tutorial, blog post, or AI answer that suggests composer require into a Laravel app is wrong. The bundle's composer.json requires Symfony components and Victoire core; Laravel's container does not know about Symfony bundle registration (AppKernel, getContainerExtension, service tags).
  • Victoire core is a hard dependency. The widget cannot work standalone — it needs Victoire's widget registry, DCMS page model, and editor JS. Installing the bundle alone gives you a set of classes no one calls.
  • Composer conflicts cascade. Because it drags 2016-era Symfony constraints, you'll likely have to force --ignore-platform-reqs or pin unrelated packages backward to get it in. The time spent resolving conflicts dwarfs the time to write a Blade component.
  • Debugging in Victoire: use the Symfony profiler and debug:container --tag=victoire.widget (tag name may vary by Victoire version) to confirm the widget is registered. If it renders blank, the Twig template path override is usually the culprit.
  • Extension points: template override, form type extension, and service decoration are the three safe customization seams. Anything else means editing vendor code you cannot upgrade.
  • The pragmatic recommendation: if a Laravel project needs this feature, do not adopt the package — reimplement the concept as a Blade component plus a JSON or polymorphic block model. You get the same editor experience, full control over markup, PHP 8 compatibility, and no 2016 dependency hanging off your composer.lock.
  • If a legacy Victoire site is the constraint: keep the bundle, pin the stack, document the abandoned dependency in your README, and budget for a migration off Victoire rather than upgrades within it. This package is a symptom, not a solution.
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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin