marvinlabs / laravel-html-bootstrap-4
A fluent html builder for Bootstrap 4 components
Fund package maintenance!
vpratfr
Installs: 19 384
Dependents: 3
Suggesters: 0
Security: 0
Stars: 42
Watchers: 4
Forks: 16
Open Issues: 10
Requires
- php: ^7.2|^8.0
- appstract/laravel-blade-directives: ^1.6.0
- illuminate/support: ^6.0|^7.0|^8.0|^9.0
- spatie/laravel-html: ^2.19.0|^3.1
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^7.0
- phpunit/phpunit: ^8.0|^9.0
- symfony/dom-crawler: ^4.1
This package is auto-updated.
Last update: 2024-11-14 14:46:30 UTC
README
About
This package is an extension on top of Spatie laravel-html package to easily produce Bootstrap 4 markup.
Installation
You can install the package via composer:
composer require marvinlabs/laravel-html-bootstrap-4
If you are using Laravel 5.5, the service provider and facade will automatically be discovered.
On earlier versions, you need to do that manually. You must install the service provider:
// config/app.php 'providers' => [ ... MarvinLabs\Html\Bootstrap\BootstrapServiceProvider::class, Appstract\BladeDirectives\BladeDirectivesServiceProvider::class, // Required if not already there ];
And optionally register an alias for the facade.
// config/app.php 'aliases' => [ ... 'BS' => MarvinLabs\Html\Bootstrap\Facades\Bootstrap::class, ];
Documentation
Documentation is still a work in progress. You are welcome to help document features if you want to contribute.
Usage
Depending on the component, you will either need to call some methods or use Blade components.
Blade components
Components based on Blade can fully be overridden. You will need to publish the package views to
resources/views/vendor/bs
with the command:
php artisan vendor:publish --provider="MarvinLabs\Html\Bootstrap\BootstrapServiceProvider" --tag="views"
Translations
Translations can fully be overridden. You will need to publish the package language files to
resources/lang/vendor/bs
with the command:
php artisan vendor:publish --provider="MarvinLabs\Html\Bootstrap\BootstrapServiceProvider" --tag="lang"
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email bonjour@vincentprat.info instead of using the issue tracker.
Credits
- Adam Wathan for the bootforms package which has been very helpful until it got dropped
- Spatie agency for the laravel-html package
- Appstract team for the laravel-blade-directives package and some BS4 blade components
License
The MIT License (MIT). Please see License File for more information.