Skip to content

marvinlabs/laravel-html-bootstrap-4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bootstrap 4 fluent HTML builder

Latest Version on Packagist Software License Total Downloads

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.