## Getting Started
Install the package via Composer:
```bash
composer require braincrafted/bootstrap-bundle
Register the bundle in config/bundles.php:
return [
// ...
Braincrafted\Bundle\BootstrapBundle\BootstrapBundle::class => ['all' => true],
];
For Laravel integration, publish the assets and configuration:
php artisan vendor:publish --provider="Braincrafted\Bundle\BootstrapBundle\BootstrapBundle" --tag=config
php artisan vendor:publish --provider="Braincrafted\Bundle\BootstrapBundle\BootstrapBundle" --tag=assets
First Use Case:
Leverage the new button Twig function for Bootstrap-styled buttons:
{{ button('Save', {'type': 'primary', 'icon': 'fa fa-save'}) }}
Use the updated form themes with Symfony 2.6+ compatibility:
{% form_theme form '_braincrafted_bootstrap3_layout.html.twig' %}
form.resources with form_themes in your configuration.Leverage new Twig functions for common Bootstrap components:
{# Button with icon #}
{{ button('Submit', {'type': 'success', 'icon': 'fa fa-check'}) }}
{# Button link #}
{{ button_link('Link', {'href': '/path', 'type': 'info'}) }}
{# Icons with custom sets #}
{{ icon('fa fa-cog', {'set': 'font-awesome'}) }}
Use the updated ScriptHandler for HHVM compatibility:
// Dynamically remove fields with event handling
$('.remove-field').on('click', function() {
var $field = $(this).closest('.field-wrapper');
$field.remove();
// Event now fires after removal
$field.trigger('removed.field');
});
Utilize the choice_translation_domain option for translated form choices:
$builder->add('role', ChoiceType::class, [
'choices' => $roles,
'choice_translation_domain' => 'messages',
]);
Publish and use the updated assets:
{% block stylesheets %}
{{ parent() }}
<link href="{{ asset('bundles/braincraftedbootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
{% endblock %}
sameas Attribute: Replaced with same in HTML attributes (PR #417).ul Tag: If lists appear broken, ensure you’re using the latest Twig templates (PR #367).ScriptHandler fix (PR #384) is applied.form.resources to form_themes in your configuration files.icon helper to support additional icon libraries (PR #392).removed.field event for dynamic field removal logic (PR #397).BootstrapExtension class..size() calls to modern equivalents (PR #404) for better compatibility.choice_translation_domain for multilingual forms (PR #382).url option over href for dynamic links (PR #385).
NO_UPDATE_NEEDED was not applicable due to significant new features, breaking changes, and improvements.
How can I help you explore Laravel packages today?