Collective\Html\FormBuilder::number PHP Метод

number() публичный Метод

Create a number input field.
public number ( string $name, string $value = null, array $options = [] ) : Illuminate\Support\HtmlString
$name string
$value string
$options array
Результат Illuminate\Support\HtmlString
    public function number($name, $value = null, $options = [])
    {
        return $this->input('number', $name, $value, $options);
    }

Usage Example

Пример #1
0
 /**
  * Build all control with the css class, label, and input.
  *
  * @param       $type
  * @param       $name
  * @param null  $value
  * @param array $attributes
  * @param array $options
  * @return string
  */
 public function buildControl($type, $name, $value = null, $attributes = [], $options = [])
 {
     switch ($type) {
         case 'select':
             $options = ['' => config('field-builder.select')] + $options;
             return $this->form->select($name, $options, $value, $attributes);
         case 'password':
             return $this->form->password($name, $attributes);
         case 'checkbox':
             return $this->form->checkbox($name, $value, isset($attributes['checked']), $attributes);
         case 'textarea':
             return $this->form->textarea($name, $value, $attributes);
         case 'number':
             return $this->form->number($name, $value, $attributes);
         case 'radio':
             return $this->form->radio($name, $value, $attributes);
         case 'email':
             return $this->form->email($name, $value, $attributes);
         default:
             return $this->form->input($type, $name, $value, $attributes);
     }
 }
All Usage Examples Of Collective\Html\FormBuilder::number