pdfloresjdav/bootstrap-bundle
Bootstrap Bundle for Laravel offers ready-to-use Bootstrap components and helpers for building responsive, styled interfaces in PHP applications. It simplifies front-end scaffolding so you can focus on your app logic.
This package is not a Laravel package — it's a Symfony2 bundle (MopaBootstrapBundle fork published as pdfloresjdav/bootstrap-bundle). As a Laravel developer, you cannot composer require this into a Laravel app and get working Bootstrap integration; the package depends on Symfony's bundle system, DependencyInjection, Assetic, and Twig. Treat it as a reference implementation to borrow ideas from, not a dependency.
Where to look first if you clone it:
Mopa\Bundle\BootstrapBundle\ — the bundle class and DI extension (DependencyInjection/Configuration.php defines the mopa_bootstrap config tree).Resources/config/*.xml|yml — service definitions for Twig extensions, form types, and menus.Resources/views/ — Twig templates, including the form themes (Form/fields.html.twig) and layout scaffolds (navbar, base layout).First use case (in its native Symfony2 world): register the bundle in AppKernel, import its config, then either extend MopaBootstrapBundle::base.html.twig or use {% form_theme form 'MopaBootstrapBundle:Form:fields.html.twig' %} to get Bootstrap-styled forms.
The Laravel translation of "first use case" is: create a BootstrapServiceProvider that publishes a few Blade components (<x-bs.navbar>, <x-bs.input>, <x-bs.alert>) and a config file — don't try to mirror the bundle's DI machinery.
In Symfony, the patterns the bundle encodes are:
twig.form.resources so every rendered form gets Bootstrap markup without per-template work. In Laravel the analogue is a Blade component (<x-input>) that already outputs form-control / is-invalid classes based on $errors.@directives, or view macros (View::macro('bsIcon', ...)).mopa_bootstrap: config with nested keys (navbar, form, icons). In Laravel, mirror this in config/bootstrap.php and read it via config('bootstrap.navbar.fixed_top') inside components.bootstrap from npm, or a CDN for prototypes.Practical porting workflow I'd recommend:
@props defaults.navbar.fixed_top, form.control_class) so Symfony docs still make sense to you.php artisan vendor:publish. Any attempt to install it will pull in Symfony framework packages (symfony/framework-bundle, symfony/assetic-bundle) that conflict with Laravel's own Symfony components at incompatible versions.NOASSERTION. That means Composer/GitHub couldn't match it to a known SPDX license. The upstream MopaBootstrapBundle is MIT, but this fork is ambiguous — do not copy template code verbatim into a commercial codebase without confirming the license. Reimplementing the concepts (Bootstrap class names, form-control wrapping, error state) is fine; wholesale copying is risky.assetic filters, and Twig 1.x constructs. Modern PHP 8.3 / Laravel 10+ will not parse or run it cleanly.new Mopa\Bundle\BootstrapBundle\MopaBootstrapBundle() in AppKernel, (2) calling assetic:dump when use_assetic=false, (3) form themes silently not applying because another bundle later overwrote twig.form.resources — check the resolved value with php bin/console debug:container twig (Symfony 2.x: debug:container --tag=twig.extension style inspection).bootstrap via npm + laravel-vite-plugin, plus a small set of hand-written Blade components for forms/navbars, or an actively maintained component package. Do not spend time forcing a Symfony2 bundle into a Laravel app.How can I help you explore Laravel packages today?