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

Socialbuttons Widget Laravel Package

friendsofvictoire/socialbuttons-widget

A Laravel widget package for adding social media share buttons to your application. It provides a reusable component for displaying links to popular social networks, helping visitors share your content. Suitable for Blade templates and widget-based layouts, it is lightweight and easy to integrate in...

View on GitHub
Deep Wiki
Context7

Getting Started

First, the framework reality check. Despite the name suggesting a generic widget, friendsofvictoire/socialbuttons-widget is a Symfony bundle (classic *Bundle suffix, FriendsOfVictoire namespace), not a Laravel package. It is part of the Victoire CMS ecosystem — a Symfony-based content management system. If you are working in a Laravel codebase, you cannot composer require this into composer.json and get anything usable without pulling in Symfony's kernel, bundle registration, and Victoire itself. Treat this as a reference implementation for concepts, not a dependency.

If you are genuinely on a Symfony/Victoire project:

  1. Require it alongside Victoire: composer require friendsofvictoire/socialbuttons-widget.
  2. Register the bundle in AppKernel.php / config/bundles.php (depending on Symfony version — this bundle predates the bundles.php convention being universal, so expect AppKernel).
  3. Enable the widget in the Victoire widget configuration so it appears in the CMS page editor.
  4. Drop the widget onto a page via the Victoire admin, then inspect the auto-generated Twig template under your app's widget overrides directory to see what was scaffolded.

First use case: rendering a row of social share buttons (Facebook, Twitter/X, etc.) as a droppable widget on a CMS-managed page, so editors can place share controls without touching Twig.

Where to look first: the bundle's Widget/ directory (the widget definition class), then Resources/views/ for the Twig template. Those two files are 90% of what the bundle does — everything else is wiring.

Implementation Patterns

Because this is a Victoire widget, the day-to-day usage follows the Victoire widget lifecycle, not a typical Laravel service provider pattern.

  • Widget-as-CMS-element pattern. The widget class declares a name, icon, and configurable fields. Editors add it to a page via the Victoire editor. Your job as developer is usually to style the rendered output and, if needed, override the widget's Twig template in your application's template directory rather than editing the vendor file.
  • Twig override pattern (Symfony equivalent of Laravel's vendor:publish). Victoire/Symfony resolve widget templates from your app's Resources/ before the bundle's own, so copy the bundle template into your app and customize there. This is the primary "integration tip" — never modify vendor/.
  • Config-driven network list. Expect the social networks to be defined declaratively (likely in the widget's config field or a bundle config array). To add/remove a network, change that config rather than hardcoding markup.
  • Share-link composition. The core logic is almost certainly building share URLs (https://www.facebook.com/sharer/sharer.php?u=..., https://twitter.com/intent/tweet?url=...) with the current page URL and optionally title. In a Laravel port, this maps cleanly to a Blade component + a small helper:
    <x-social-buttons :url="url()->current()" :title="$page->title" />
    
  • Porting pattern to Laravel. If you actually want this feature in Laravel, don't fight the framework mismatch — reimplement it as a Blade component or a Filament/nova-style field. The bundle is small enough that a reimplementation is faster and safer than any compatibility shim.

Gotchas and Tips

  • Abandoned since April 2019. Last release 2019-04-04, 1 star, 0 dependents. No security patches, no PHP 8 / Symfony 5+ guarantees. Do not introduce this into anything you must maintain long-term.
  • Framework mismatch is the headline gotcha. A Laravel developer cannot consume this bundle. There is no service provider, no facade, no config/socialbuttons.php. Any tutorial or Stack Overflow answer you find for it assumes Symfony's container and Victoire's widget registry.
  • Victoire is a hard dependency. Even on Symfony, the widget only functions inside a Victoire-enabled CMS. Without Victoire, the widget class has nothing to register with.
  • Symfony version pinning. A 2019 bundle will likely cap symfony/* and PHP constraints below current versions; Composer will fight you on a modern Symfony app. Check composer.json constraints before attempting install.
  • Debugging rendering issues: clear Symfony's cache (bin/console cache:clear) and verify the template override path is winning over the bundle's copy — template resolution order is the #1 source of "my edits didn't apply."
  • Extension point (the sane one): if you must stay in the Symfony ecosystem, subclass or decorate the widget class rather than modifying vendor code, and keep your template override in the app's Resources/.
  • Laravel-idiomatic alternative: for a new Laravel project, use a maintained package (e.g., social-share helpers) or a two-line Blade partial with the share URLs. The entire value of this bundle — CMS-editor placement — does not transfer to Laravel without Victoire, so the "leverage" for a Laravel dev is essentially zero beyond reading it as a spec.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib