Download the PHP package goldcarrot/laravel-bootstrap-forms without Composer

On this page you can find all versions of the php package goldcarrot/laravel-bootstrap-forms. 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 laravel-bootstrap-forms

Laravel Bootstrap Forms.

Build Status Total Downloads Latest Stable Version License

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require laraeast/laravel-bootstrap-forms.

You should publish the flags icons in public path to display in multilingual form tabs.

Opening A Form

By default, a POST method will be assumed; however, you are free to specify another method:

Note: Since HTML forms only support POST and GET, PUT and DELETE methods will be spoofed by automatically adding a _method hidden field to your form.

You may also open forms with method as well:

You may also open forms that point to named routes or controller actions:

You may pass in route parameters as well:

Text, Text Area, Date, Number & Password Fields

Generating A Text Input

Specifying A Default Value

Note: The date, number and textarea methods have the same signature as the text method.

Generating A Password Input

Generating Other Inputs

Checkboxes and Radio Buttons

Generating A Checkbox Or Radio Input

By default, will send default value "0" with an unchecked checkbox, if you want to disable it globally set the configuration key "laravel-bootstrap-forms.checkboxes.hasDefaultValue": true

Drop-Down Lists

Generating A Drop-Down List With Selected Default

Generating a Drop-Down List With an Empty Placeholder

Generating A Grouped List

Generating A Submit Button

Generateing A Submit Button With Bootstrap Button Style

Supported Methods

->label($label) : To Generate label to the specified field.

->name($name) : To Generate label to the specified field.

->placeholder($placeholder) : To Set placeholder attribute to the specified field.

->min($min) : To Set min attribute to the specified number field.

->max($max) : To Set max attribute to the specified number field.

->step($step) : To Set step attribute to the specified number field.

->multiple($bool = true) : To Set multiple attribute to the specified select and file fields.

->note($note) : To Set help-block to the specified field.

->name($name) : To Set the name of to the specified field.

->value($value) : To Set the value of to the specified field as default will set old('name').

->inlineValidation($bool = true) : To display validation errors in the specified field.

->style($style = 'default') : To Set style to the specified field. supported ['default', 'vertical'].

->close() : To close the form tag.

Using Resource With Localed Fields

You may add localed labels, notes and placeholders using resource option as well:

You must add users.php file to the resources/lang/en/ path and set the default attributes and notes, placeholders as well:

Using Custom Error Message Bag

You can using custom error bag to display validation errors without any conflict.

Example Register Form

Using Multilingual Form Tabs

Note : the input name inside @bsMultilangualFormTabs and @endBsMultilangualFormTabs suffix with :{lang}.

Ex. if your supported language is ar & en the input will named with name:ar & name:en.

You should use Astrotomic/laravel-translatable and configure it's rule_factory with key format \Astrotomic\Translatable\Validation\RuleFactory::FORMAT_KEY to fill the multilingual data like the following example.

Manage Locales

You can add your supported locales in locales.php config file. you will get it using the following command:

Using Bootstrap 3

If you want to use bootstrap 3 you should publish the config file using the following commad and set the bootstrap version globally.

After change bootstrap version you should clear the cached view files using the view:clear artisan command.

Add Custom Style To The Component

run the vendor:publish artusan command to override components views as well.

will override components in resources/views/vendor/BsForm path.

you can copy default.blade.php file as custom.blade.php and use custom style as well :

you can also set the style globally with BsForm::style() method before the form open as well :

or

To reset the custom style to the default you should call clearStyle() method as well:

For Example :

Add Custom Component

You may add new component class extends BaseComponent and regoster it in your boot() method in AppServiceProvider class as well:

Then register the component class in boot() method in your AppServiceProvider class as well :

Then publish the BsForm views and create the new component file in views/vendor/BsForm/bootstrap4/components/image/default.blade.php path.

Eexample content of views/vendor/BsForm/bootstrap4/components/image/default.blade.php file :

Usage


All versions of laravel-bootstrap-forms with dependencies

PHP Build Version
Package Version
Requires laravelcollective/html Version ^5.6|^6.0|^7.0
laraeast/laravel-locales Version ^3.0
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 goldcarrot/laravel-bootstrap-forms contains the following files

Loading the files please wait ....