Laravel Twitter Bootstrap Bundle

Related tags

Laravel bootstrapper
Overview

Bootstrapper

Latest stable version: Latest Stable Version

Travis status : Build Status

Current supported Bootstrap version: 3.2.0

Bootstrapper is a set of classes that allow you to quickly create Twitter Bootstrap 3 style markup.

Installation

Add the following to your composer.json file :

"require": {
    "patricktalmadge/bootstrapper": "~5",
},

or execute

composer require patricktalmadge/bootstrapper

Then register Bootstrapper's service provider with Laravel:

'Bootstrapper\BootstrapperServiceProvider',

If you are using Laravel 5, then you should instead use the Laravel 5 service provider.

'Bootstrapper\BootstrapperL5ServiceProvider',

You can then (if you want to) add the following aliases to your aliases array in your config/app.php file.

'Accordion' => 'Bootstrapper\Facades\Accordion',
'Alert' => 'Bootstrapper\Facades\Alert',
'Badge' => 'Bootstrapper\Facades\Badge',
'Breadcrumb' => 'Bootstrapper\Facades\Breadcrumb',
'Button' => 'Bootstrapper\Facades\Button',
'ButtonGroup' => 'Bootstrapper\Facades\ButtonGroup',
'Carousel' => 'Bootstrapper\Facades\Carousel',
'ControlGroup' => 'Bootstrapper\Facades\ControlGroup',
'DropdownButton' => 'Bootstrapper\Facades\DropdownButton',
'Form' => 'Bootstrapper\Facades\Form',
'Helpers' => 'Bootstrapper\Facades\Helpers',
'Icon' => 'Bootstrapper\Facades\Icon',
'InputGroup' => 'Bootstrapper\Facades\InputGroup',
'Image' => 'Bootstrapper\Facades\Image',
'Label' => 'Bootstrapper\Facades\Label',
'MediaObject' => 'Bootstrapper\Facades\MediaObject',
'Modal' => 'Bootstrapper\Facades\Modal',
'Navbar' => 'Bootstrapper\Facades\Navbar',
'Navigation' => 'Bootstrapper\Facades\Navigation',
'Panel' => 'Bootstrapper\Facades\Panel',
'ProgressBar' => 'Bootstrapper\Facades\ProgressBar',
'Tabbable' => 'Bootstrapper\Facades\Tabbable',
'Table' => 'Bootstrapper\Facades\Table',
'Thumbnail' => 'Bootstrapper\Facades\Thumbnail',

Including Bootstrap

Include the Bootstrap files just like any other css and js files! Download Bootstrap and JQuery from the Bootstrap site, place them in your public folder and then include them like so:

{{ HTML::style('path/to/bootstrap.css') }}
{{ HTML::script('path/to/jquery.js') }}
{{ HTML::script('path/to/bootstrap.js') }}

Feel free to use a CDN, but bear in mind that you may get unexpected functionality if the version you use isn't the version Bootstrapper currently supports (but open an issue to let us know!).

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

If you want to get the latest Bootstrap that Bootstrapper supports, then use the helper function:

Helpers::css()
Helpers::js()

If you want to stick at a certain version then use

artisan config:publish patricktalmadge/bootstrapper

And update your config file in app/config/packages.

We also have Twitter Bootstrap as a dependency, so you can grab the files from your vendor directory.

Documentation

Contributing

Contributing is easy! Just fork the repo, make your changes then send a pull request on GitHub. If your PR is languishing in the queue and nothing seems to be happening, then send Patrick an email or a tweet.

Comments
  • Laravel V4 - ErrorException

    Laravel V4 - ErrorException

    Was working until recent composer update. Simple route thus:-

    Route::get('/', function()
    {
        return Basset::show('bootstrapper.css');
    });
    

    results in trace:-

    in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php line 41
    at ErrorHandler->handle('2', 'file_get_contents(): Filename cannot be empty', 'C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php', '41', array('path' => null))
    at file_get_contents('') in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php line 41
    at Filesystem->getRemote(null) in C:\laravel_V4_beta\vendor\jasonlewis\basset\src\Basset\Asset.php line 97
    at Asset->__construct(null, object(Application)) in C:\laravel_V4_beta\vendor\jasonlewis\basset\src\Basset\Collection.php line 138
    at Collection->add('packages/patricktalmadge/bootstrapper/js/jquery-1.9.1.min.js') in C:\laravel_V4_beta\vendor\patricktalmadge\bootstrapper\src\Bootstrapper\BootstrapperServiceProvider.php line 45
    at BootstrapperServiceProvider->Bootstrapper\{closure}(object(Collection)) in C:\laravel_V4_beta\vendor\jasonlewis\basset\src\Basset\Basset.php line 94
    at Basset->collection('bootstrapper', object(Closure)) in C:\laravel_V4_beta\vendor\jasonlewis\basset\src\Basset\Basset.php line 158
    at Basset->registerCollections() in C:\laravel_V4_beta\vendor\jasonlewis\basset\src\Basset\Basset.php line 31
    at Basset->__construct(object(Application)) in C:\laravel_V4_beta\vendor\jasonlewis\basset\src\Basset\BassetServiceProvider.php line 47
    at BassetServiceProvider->Basset\{closure}(object(Application)) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Container\Container.php line 124
    at Container->Illuminate\Container\{closure}(object(Application), array()) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Container\Container.php line 280
    at Container->build(object(Closure), array()) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Container\Container.php line 225
    at Container->make('basset', array()) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Foundation\Application.php line 342
    at Application->make('basset') in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Container\Container.php line 455
    at Container->offsetGet('basset') in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php line 54
    at Facade::resolveFacadeInstance('basset') in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php line 97
    at Facade::__callStatic('show', array('bootstrapper.css')) in C:\laravel_V4_beta\app\routes.php line 16
    at Basset::show('bootstrapper.css') in C:\laravel_V4_beta\app\routes.php line 16
    at {closure}()
    at call_user_func_array(object(Closure), array()) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Routing\Route.php line 72
    at Route->callCallable() in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Routing\Route.php line 47
    at Route->run(object(Request)) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Routing\Router.php line 807
    at Router->dispatch(object(Request)) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Foundation\Application.php line 411
    at Application->dispatch(object(Request)) in C:\laravel_V4_beta\vendor\laravel\framework\src\Illuminate\Foundation\Application.php line 396
    at Application->run() in C:\laravel_V4_beta\public\index.php line 51
    

    Seems as though empty array string is being passed via IoC?

    opened by gandm 17
  • Add

    Add "\n" to return results

    Otherwise, the HTML source looks so so ugly in the browser.

    One example https://github.com/patricktalmadge/bootstrapper/blob/master/buttons.php#L67

    Appending ."\n" to the end.

    opened by Geczy 17
  • Update Docs Site For V4

    Update Docs Site For V4

    I posted the docs site code to github. Here is the link: https://github.com/patricktalmadge/Bootstrapper-docs

    @Anahkiasen I added you as a collaborator to this repo.

    opened by patricktalmadge 16
  • Bootstrapper in Laravel 4

    Bootstrapper in Laravel 4

    Hej, I used your instructions to get Basset with composer, do asset:publish, add it to template file with

    {{{ Basset::show('bootstrapper.js') }}}
    

    , but it shows this error after loading:

    <!-- Basset could not find collection: bootstrapper -->
    

    Is there something I forgot to do, or did something fail to install properly?

    opened by kriswema 15
  • Add icon support

    Add icon support

    <button type="submit" name="controls" value="prev" class="btn btn-large btn-inverse"><i class="icon-step-backward icon-white"></i></button>

    opened by Geczy 13
  • carousel

    carousel

    im using your code on laravel 4.1, bootstrapper dev-develop branch and bootstrap 3:

    {{ Carousel::create($images) }} //$images => array of arrays of data
    
      <script type="text/javascript">
        $('.carousel').carousel({
          interval: 3000
        })
      </script>
    

    but i get this

    So wrong arrows position, size, no circles at the bottom...

    Any idea?

    bug 
    opened by dcrystalj 12
  • Incorrect src on Image::thumbnail

    Incorrect src on Image::thumbnail

    My url in config/app.php is set to http://something.dev/. I create an Image::thumbnail with the following url: https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/Test%201@something%3Fsecret%3D5Z7UQRZ2M6QR4TSB%26issuer%3Dsomething However, the generated image will have the following src: http://something.dev/https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/Test%201@something%3Fsecret%3D5Z7UQRZ2M6QR4TSB%26issuer%3Dsomething

    opened by sdebruyn 11
  • Allow overriding Button::submit, etc. default class

    Allow overriding Button::submit, etc. default class

    Form::submit('Submit', array('class' => 'btn btn-warning'))
    

    Will result in the button having both btn-default and btn-warning. If a btn-* class is passed in then the btn-default class shouldn't be added as well.

    opened by EspadaV8 11
  • Installation Instructions for Laravel 4?

    Installation Instructions for Laravel 4?

    Hello Patrick. I've just enjoyed a week or so tinkering with your package in Laravel 3 but now want to use it in L4. Is this possible yet? How do I go about getting it working once I install it through Composer? Thanks.

    opened by Bulmer 11
  • 'Active' Class on Navbar Links

    'Active' Class on Navbar Links

    I am creating a Navbar. It creates it fine, but it's not applying the "active" class. From I understood it should do it automatically. Am I wrong? Thanks.

    opened by silverskymedia 9
  • Remove requirement of Basset

    Remove requirement of Basset

    Unfortunately it appears that Basset is not longer being developed/maintained. Perhaps it would be wise to not longer require it as a dependency for Bootstrapper

    opened by syphernl 9
  • Laravel 9.x Compatibility

    Laravel 9.x Compatibility

    This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 9.x.

    Before merging, you need to:

    • Checkout the l9-compatibility branch
    • Review all comments for additional changes
    • Thoroughly test your package

    If you do find an issue, please report it by commenting on this PR to help improve future automation.

    opened by laravel-shift 1
  • Declaration of Bootstrapper\Form::select.....should be compatible with Collective\Html\FormBuilder::select

    Declaration of Bootstrapper\Form::select.....should be compatible with Collective\Html\FormBuilder::select

    Contents of my composer.json "require": { "laravel/framework": "5.5.*", "patricktalmadge/bootstrapper": "~5" },

    Declaration of Bootstrapper\Form::select($name, $list = Array, $selected = NULL, array $selectAttributes = Array, array $optionsAttributes = Array) should be compatible with Collective\Html\FormBuilder::select($name, $list = Array, $selected = NULL, array $selectAttributes = Array, array $optionsAttributes = Array, array $optgroupsAttributes = Array)

    opened by ryanbayona 0
  • Facade 'Icon' => Bootstrapper\Facades\Icon::class doesn't get glyphicon in Bootstrap 4

    Facade 'Icon' => Bootstrapper\Facades\Icon::class doesn't get glyphicon in Bootstrap 4

    I've noticed that glyphicon was dropped (see http://v4-alpha.getbootstrap.com/migration/) after updating my app to Bootstrap 4.

    How can I change automatic generation of code to another library (like open-iconic). Today, the automatic generated code like: <span class='glyphicon glyphicon-floppy-disk'></span> And I need to change it to: <span class='oi oi-floppy-disk'></span>

    opened by diegoquirino 0
Owner
Patrick Talmadge
Patrick Talmadge
Twitter clone project being developed by using PHP Laravel Framework and tailwind.css

Twits! About Twits! We, as enthusiastic learners and new developers, kicked of this project in order to improve our skills and capabilities in PhP Lar

Furkan Meraloğlu 10 Aug 29, 2022
Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.

Laravel Countries Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries. Please

Christoph Kempen 695 Dec 30, 2022
Symfony bundle that provides Cross Site Request Forgery (CSRF or XSRF) protection for client-side applications

CSRF Cookie Bundle This Symfony bundle provides Cross Site Request Forgery (CSRF or XSRF) protection for client-side applications requesting endpoints

David Neustadt 8 Nov 28, 2022
The query filter bundle allows you to filter data from QueryBuilder and the Database.

The query filter bundle allows you to filter data from QueryBuilder and the Database. you can filter multiple columns at the same time and also you can filter relation fields with two-level deep and without any join in your query builder.

Bugloos 15 Dec 29, 2022
An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel, Bootstrap, and Vue.js

Laravel Soundboard An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel 5.8, Bootstrap 4, Vue.js, Boot

Jeremy Kenedy 24 Oct 28, 2022
Dynamic Laravel Livewire Bootstrap 5 modals.

Laravel Livewire Modals Dynamic Laravel Livewire Bootstrap 5 modals. Requirements Bootstrap 5 Installation Require the package: composer require basti

null 55 Dec 27, 2022
Laravel Livewire form component with declarative Bootstrap 5 fields and buttons.

Laravel Livewire Forms Laravel Livewire form component with declarative Bootstrap 5 fields and buttons. Requirements Bootstrap 5 Installation composer

null 49 Oct 29, 2022
Dynamic Laravel Livewire Bootstrap toasts.

Laravel Livewire Toasts This package allows you to dynamically show Bootstrap toasts via Laravel Livewire components. Documentation Requirements Insta

null 13 Nov 12, 2022
Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.

bastinald/ux Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire. Features Automatic migrations Automatic routing Automatic passwo

null 33 Nov 26, 2022
Rapid form generation with Bootstrap 3 and Laravel.

Important: This package is not actively maintained. For bug fixes and new features, please fork. BootForms BootForms builds on top of my more general

Adam Wathan 423 Jun 14, 2022
Using Bootstrap 5 in Laravel 8

This repository containes a fresh installed Laravel 8.64 project containing : laravel/ui Authentification scaffolding Bootstrap 4 is replaced by Boots

Marc Geurts 8 Dec 26, 2022
Dating Web App in Laravel and Bootstrap

Dating Web App Expected Outcome: A simple dating web app with both Laravel and Bootstrap using the Latest version. Feature List: Registration with Nam

RezowanaAkter 0 May 16, 2022
Sweetalert and Toaster notifications for Laravel livewire with support for tailwind and bootstrap.

Larabell Integrate livewire with sweetalert. Installation How to use Sweetalert Toast Available configuration Installation composer require simtabi/la

Simtabi 3 Jul 27, 2022
A Simple Store Front Web Application using Laravel and Bootstrap.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Basil Basaif 1 Nov 28, 2021
CoreUI Free Laravel Bootstrap Admin Template

CoreUI Free Laravel Bootstrap Admin Template Curious why I decided to create CoreUI? Please read this article: Jack of all trades, master of none. Why

CoreUI 538 Dec 19, 2022
Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5

Volt Dashboard Laravel Free Frontend Web App for Laravel with Livewire & Alpine.js Never start a development project from scratch again. We've partner

Themesberg 200 Jan 4, 2023
A Laravel starter kit with auth scaffolding using Livewire & Bootstrap.

Zephyr This package is a Laravel starter kit with auth scaffolding using Livewire & Bootstrap. It was created for people who prefer using Livewire & B

null 23 Aug 26, 2022
A helper package to flash a bootstrap alert to the browser via a Facade or a helper function.

Alert Box (Laravel) A helper package to flash a bootstrap alert to the browser via a Facade or a helper function. <div class="alert alert-info fade in

Ben-Piet O'Callaghan 17 Dec 30, 2022
Loja virtual fictícia para compra de produtos e estilização dos mesmos. Desenvolvido com as tecnologias: HTML, CSS, PHP, CODEIGNITER, JavaScript, Bootstrap e Mysql.

StampGeek Loja virtual fictícia para compra de produtos e estilização dos mesmos. Desenvolvido com as tecnologias: HTML, CSS, PHP, CODEIGNITER, JavaSc

Pablo Silva 1 Jan 13, 2022