Weave Code
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
Expanded Collection Bundle

Expanded Collection Bundle Laravel Package

abdielcs/expanded-collection-bundle

Symfony 2/3 bundle that renders entity collections as expanded selectable lists (checkboxes). Provides form types extending EntityType, supports OneToMany and ManyToMany relations, configurable displayed fields, and includes a Bootstrap 3 theme example.

View on GitHub
Deep Wiki
Context7

Symfony 2 and 3 bundle for rendering a collection of entities as an expanded selectable list

Frequently asked questions about Expanded Collection Bundle
Can I use this bundle directly in Laravel without Symfony?
No, this bundle is designed for Symfony 2/3 and won’t work natively in Laravel due to differences in form handling (Symfony’s FormComponent vs. Laravel’s FormBuilder). You’d need to create a custom wrapper or port the logic to Laravel’s ecosystem, which may require significant refactoring.
How do I render OneToMany relationships as expanded checkboxes in Laravel?
Since the bundle isn’t Laravel-compatible, you’d need to build a custom solution using Eloquent relationships, Blade templates, and checkbox inputs. Start with a simple query to fetch related entities, loop through them in Blade, and use checkboxes with `old()` for form persistence. Libraries like Livewire can add dynamic behavior.
Does this bundle support Laravel’s Eloquent Query Builder?
No, the bundle uses Symfony’s QueryBuilder. To replicate this in Laravel, replace Symfony’s QueryBuilder logic with Eloquent’s `where()`, `with()`, or `has()` methods. For example, use `$model->whereHas('relation')->get()` instead of Symfony’s `query_builder` option.
What’s the best way to migrate this bundle’s features to Laravel?
Start with a proof-of-concept: create a custom form component or Livewire class that mimics the expanded checkbox behavior. Use Eloquent for data fetching, Blade for rendering, and Laravel’s validation rules. Gradually replace the Symfony bundle in your admin panels while testing performance and UX.
Is there a Laravel alternative to this bundle’s expanded checkbox functionality?
Yes, you can achieve similar results with Laravel Collective’s HTML package for basic checkbox lists or custom Blade components. For dynamic behavior, Livewire or Alpine.js can handle expanded/collapsible lists with minimal backend logic. Avoid reinventing the wheel unless you need Symfony-specific features.
How do I configure which entity properties display in the checkbox list?
In Laravel, you’d manually define which properties to display in your Blade template or Livewire component. For example, loop through `$entities` and render `$entity->name` or `$entity->getFormattedProperty()`. Unlike the Symfony bundle, Laravel doesn’t enforce a single configuration system, so you’ll need to structure this logic in your controller or component.
Will this bundle work with Laravel 10+ and Symfony 6+?
No, this bundle is abandoned (last release in 2016) and targets Symfony 2/3. It won’t work with modern Laravel or Symfony versions. If you’re using Laravel, focus on native solutions or forks that explicitly support Laravel’s ecosystem. Always check compatibility before adopting legacy packages.
Can I use Bootstrap 3 with this bundle in Laravel?
The bundle includes Bootstrap 3 themes, but integrating them into Laravel requires manual setup. Use Laravel Mix or Vite to include Bootstrap 3 CSS/JS, then replicate the bundle’s HTML structure in Blade. Alternatively, use a modern CSS framework like Tailwind or Bootstrap 5 for better compatibility.
How do I handle ManyToMany relationships with checkboxes in Laravel?
Laravel handles ManyToMany relationships natively with pivot tables. For checkbox lists, fetch the related entities with `$model->relations()->get()`, then loop through them in Blade with checkboxes bound to the pivot table. Use `sync()` or `attach()` in your controller to save selections. Livewire can simplify dynamic updates.
Are there performance concerns when rendering large entity collections as checkboxes?
Yes, rendering large collections can impact performance. In Laravel, optimize by using `cursor()` for Eloquent queries, implementing pagination in Blade, or lazy-loading entities with JavaScript (e.g., Alpine.js or Livewire’s infinite scrolling). Avoid eager-loading unnecessary relationships to reduce memory usage.
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle