emiliolodigiani/laravel-bs3

Bootstrap 3 view partials for Laravel 5.x

v1.0.1 2018-01-03 13:51 UTC

This package is not auto-updated.

Last update: 2024-05-17 05:36:44 UTC


README

Latest Version on Packagist Build Status Total Downloads

Package for adding precomposed Twitter Bootstrap 3 view partials, such as forms, form inputs, panels, buttons, etc.

The package is mainly intended for internal use and it's not fully documented yet.

Installation

You can install the package via composer:

composer require emiliolodigiani/laravel-bs3

Usage

In blade templates:

Back button

@include('bs3::button.backButton')
@include('bs3::button.backButton', ['href' => 'SOMEURL', 'text' => 'Back', 'icon' => 'chevron-left'])

Back url default to previous visited url. Icon defaults to chevron-left (Font Awesome).

Panel

Simple panel

@component('bs3::component.panel', ['title' => 'Panel Title'])
    <p>Panel content.</p>
@endcomponent

Full featured panel

<div class="row">
    @component('bs3::component.panel', [
        'grid' => 'col-md-6', {{-- Optional --}}
        'type' => 'success', {{-- Optional: (default) | success | warning | danger | info --}}
        'title' => 'Panel Heading', {{-- Optional --}}
        'titleIcon' => 'user' {{-- Optional, generates a Font Awesome fa-user icon --}}

    ])
        <p>Panel content, optional.</p>

        @slot('table') {{-- Optional --}}
            <table class="table table-hover">
                ... 
            </table>
        @endslot
        @slot('footer') {{-- Optional --}}
            <p>Panel footer.</p>
        @endslot
    @endcomponent
    
    ... other panels ...
</div>

Completion in PhpStorm

In PhpStorm setting go to Language & Frameworks > PHP > Laravel > Views / Template, add a new setting with the following:

  • Project-Path: vendor/emiliolodigiani/laravel-bs3/resources/views
  • Namespace: bs3

Testing

phpunit

or

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email emiliolodigiani@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.