Download the PHP package fewagency/twbs-blade without Composer

On this page you can find all versions of the php package fewagency/twbs-blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twbs-blade

Blade templates for Twitter Bootstrap

This package is no longer maintained! Please see fewagency/fluent-form and fewagency/fluent-html for the replacements we use!

A collection of Laravel Blade templates for displaying Twitter Bootstrap html elements and components.

Configuration

Add this to your list of providers in config/app.php:

Usage examples

Single input field

Example:

Printing a full form

Example:

Form options

Each form will contain a hidden csrf-field and by default display validation information next to each input.

groups

An array of inputs (or other elements) to display in the form. Array key is the input name and each entry is usually an array of input options.

An entry can also be a single string or a non-associative array of strings, and if so they are displayed as strings of html within a .form-group element.

model (optional)

If supplied, inputs will be pre-filled with corresponding attribute values from this object.

action (optional)

Maps directly to the form's action attribute. If omitted the form will usually post back to the current page.

method (optional)

Maps directly to the form's method attribute. Defaults to POST, can be set to GET.

role (optional)

Maps directly to the form's role attribute. Defaults to form.

form_id (optional)

Sets the form's id attribute. Defaults to a generated id if omitted.

group_form_errors (optional)

Defaults to false, but if true all error-messages will be displayed together at the top of the form instead of next to their related inputs. This is useful for forms where validation-messages are not directly related to specific inputs, e.g. login forms.

Input options

name

Name of the input, will be posted with the form. This option is pulled from the array key if the bsb::form template is used.

type

Defaults to text if omitted. The implemented types are:

In addition, most HTML5 input types work fine, e.g. number, email, etc. The multiselect types will automatically add brackets to the form input's name to access selected values as an array at the server side.

label/html_label

Displayed before the input and connected to it via element's id. Defaults to name if not supplied.

help_text/html_help_text

This is displayed after the input and connected to it with aria-describedby.

help_block_tag

This can override the type of html element that contains the help text. If not set span is used around help_text and div around html_help_text.

no_label

Set this to true to not display any label for the form-group.

group_label

Set this to true on checkboxes to display the group-label instead of having the label within the input-tag.

no_group

Set to true to not have a .form-group class on the input's grouping div. Useful for keeping a list of checkboxes closer together.

value

Can be used to specifically set the value attribute of the input. The value is usually automatically pulled from old input or from a model. The value defaults to 1 for checkboxes.

selected_values

Can be used with selects and multiselects to specify the pre-selected value or an array of pre-selected values. This is usually automatically pulled from old input or from a model.

checked

Set to true on a checkbox to make it pre-selected. Otherwise the checked-status is pulled from old input or from a model.

options/options_html

Can be used with selects and multiselects to specify the list of available options. options_html is used as raw output within the select tag. options can be an array of label strings with the corresponding values as keys. If no options are specified, the supplied model will be checked for a property called inputname_options.

input_attributes

Array of extra html attributes (keys and values) to put on the input element. Boolean attributes (like disabled) can be set to true for the desired effect. If the class attribute is set here it's value is merged with any other classes that have been set automatically.

Optional package configuration

The bsb prefix can be changed if you extend the service provider class in your app and set your desired $package_reference_name in there (if you do this, remember to reference your own service provider in your config/app.php instead of the one supplied by this package)

You may publish the blade templates to your project's views/vendor directory for editing and overriding the original templates:

php artisan vendor:publish --provider="FewAgency\TwbsBlade\TwbsBladeServiceProvider"


All versions of twbs-blade with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fewagency/twbs-blade contains the following files

Loading the files please wait ....