Skip to content

Commit

Permalink
Merge branch 'molayli-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaze committed May 14, 2020
2 parents dd1ede3 + 6f3c9c6 commit c0fffd7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ All the input functions accept following common options in addition to their spe
+ `BF::number()` / `@number()`
+ `BF::date()` / `@date()`
+ `BF::time()` / `@time()`
+ `BF::color()` / `@color()`
+ `BF::textarea()` / `@textarea()`
+ `BF::password()` / `@password()`

Expand Down Expand Up @@ -627,6 +628,7 @@ Here is the list of available methods and directives:
| BF::number() | @number() | Create a number input |
| BF::date() | @date() | Create a date input |
| BF::time() | @time() | Create a time input |
| BF::color() | @color() | Create a color input |
| BF::textarea() | @textarea() | Create a textarea |
| BF::password() | @password() | Create a password input |
| BF::file() | @file() | Create a file input |
Expand Down
14 changes: 14 additions & 0 deletions src/BootstrapForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,20 @@ public function password($name, $label = null, array $options = [])
}


/**
* Create a Bootstrap color field input.
*
* @param string $name
* @param string $label
* @param array $options
* @return string
*/
public function color($name, $label = null, $value = null, array $options = [])
{
return $this->input('color', $name, $label, $value, $options);
}


/**
* Create a Bootstrap textarea field input.
*
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapFormServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function registerBladeDirectives()
{
$functions = [
'open', 'close', 'vertical', 'inline', 'horizontal',
'text', 'email', 'url', 'tel', 'number', 'date', 'time', 'textarea', 'password',
'text', 'email', 'url', 'tel', 'number', 'date', 'time', 'textarea', 'password','color',
'file', 'hidden', 'select', 'range',
'checkbox', 'checkboxes', 'radio', 'radios',
'label', 'submit', 'reset', 'button', 'link',
Expand Down

0 comments on commit c0fffd7

Please sign in to comment.