friendsofvictoire/table-widget
friendsofvictoire/table-widget is a Laravel package for rendering reusable, configurable data tables in Blade views. Define columns and rows once, then reuse the widget across admin pages and dashboards for consistent table output.
Read the fine print first: this is not a Laravel package. friendsofvictoire/table-widget is a Symfony bundle (FriendsOfVictoire/WidgetTableBundle) that plugs into Victoire, a Symfony-based CMS. There is no service provider, no facade, no Blade views, and no config/table-widget.php. A Laravel developer cannot composer require this into an artisan-driven app and expect it to boot.
Minimal steps to actually see it work:
AppKernel, not Flex).composer require friendsofvictoire/table-widget in that project.AppKernel::registerBundles() and run the Victoire widget discovery/asset commands (assets:install, assetic:dump in that era).Where to look first: the bundle's Resources/views/ for the Twig templates (the actual rendering contract), the form type that defines what an editor can enter, and the Widget model class that declares the widget name and default attributes. Those three files tell you everything about the data shape and HTML output.
First real use case: a marketing/CMS page where a non-technical editor needs to drop in a small data table (pricing tiers, spec sheets, opening hours) without touching templates. That is the entire scope of this bundle.
Laravel verdict: treat this as a reference implementation, not a dependency. The idea — an editor-configurable table widget with a fixed data schema and a server-rendered template — ports cleanly to Laravel as a Blade component plus a JSON column or a table_widgets table.
If you are genuinely in Victoire (Symfony):
{% extends '@FriendsOfVictoireWidgetTable/...' %} or the Symfony bundle-override path in app/Resources/) is the sanctioned extension point. All styling decisions belong there.Widget entity, so editors get independent tables per page. Do not try to share one table definition across pages — there is no shared-table concept.If you are porting the idea to Laravel (the realistic path):
// app/View/Components/DataTable.php
class DataTable extends Component
{
public function __construct(
public array $columns,
public array $rows,
public bool $striped = true,
) {}
}
json column (tables.schema) or a translatable JSON field; validate with a FormRequest so editors can't submit ragged rows.{!! !!}.Cache::remember("table:{$id}")) and bust on save — tables on CMS pages are read-heavy and change rarely.Integration tip: if you must consume Victoire-rendered HTML from a Laravel app, do it over HTTP and treat the output as untrusted markup (sanitize with a whitelist) rather than trying to reimplement the widget.
symfony/symfony ~2.7|~3.0, Assetic for assets, and possibly twig/twig ^1.x. Composer will fight you on any modern PHP; --ignore-platform-reqs is a trap, not a fix.var/cache will mask your override. Always cache:clear after touching Twig paths.<table>. Plan a wrapper with overflow-x:auto or a stacked-card breakpoint yourself.{{ dump(widget) }} with Twig debug on) — that array is the API.How can I help you explore Laravel packages today?