Enregistre un input standard.

@param string     $type Type d'input.
@param string     $name Clé unique.
@param string     $id   Selecteur CSS.
@param array|null $attr Liste d'attributs.

@return $this
191969
public function inputBasic($type, $name, $id, array $attr = null)
    {
        $basic = $this->merge_attr([ 'id' => $id ], $attr);

        return $this->input($name, [ 'type' => $type, 'attr' => $basic ]);
    }
888009
public static function input(
                        $type = 'text',
                        $name = '',
                        $class = '',
                        $id = NULL,
                        $value = NULL,
                        $label = NULL,
                        $attrs = array()
                        )
    {
        
        $attrs['type'] = $type;
        
        $ret = NULL;
        if($label)
            $ret .= PHP_EOL . self::formatLabel($label, $id);
        
        if($value)
            $attrs['value'] = $value;
        
        $attrs['name'] = $name;
        
        $ret .= self::tag('input', NULL, $class, $id, $attrs);
        return $ret;
    }
895137
public function orderBy(?string $name, string $type = self::ORDER_ASC): AbstractRepository
    {
        $this->sorter['name'] = $name;
        $this->sorter['type'] = $type;

        return $this;
    }
229691
protected function getMorphs(string $name, string $type = null, string $id = null): array
    {
        return [
            $type ?: $name.'_type',
            $id ?: $name.'_id',
        ];
    }
723141
public function argument($type, $name) {
        $argument = new Argument($type, $name);
        $this->addArgument($argument);

        return $argument;
    }
30007
public function create($name, $type = null, array $options = [])
    {
        return $this->formBuilder->create($name, $type, $options);
    }
710384
public function addType($name, $type, $data = null, $options = array())
    {
        $this->types[$name] = $type;
        $this->data[$name] = $data;
        $this->options[$name] = $options;

        return $this;
    }
925641
public function input($type, $name, $value = null, $options = [])
    {
        // Don't add form-control for some input types (like submit, checkbox, radio)
        if (!in_array($type, ['submit', 'checkbox', 'radio', 'reset', 'file'])) {
            $options = $this->appendClassToOptions('form-control', $options);
        } else if (in_array($type, ['submit', 'reset'])) {
            $options = $this->appendClassToOptions('btn', $options);
        }

        // Call the parent input method so that Laravel can handle
        // the rest of the input set up.
        return parent::input($type, $name, $value, $options);
    }
876867
public static function input(
        string $name, 
        string $type = "text", 
        string $value = null, 
        array $attributes = []
    ) : string 
    {
        $preAttributesInput = [
            "name" => $name,
            "type" => $type,
        ];
        if (!is_null($value)) {
            $preAttributesInput["value"] = $value;
        }
        $attributesInput = array_merge($preAttributesInput, $attributes);
        return self::tag("input", "", $attributesInput);
    }
1311980
public function add($name, $type)
    {
        $property = clone self::$propertyPrototype;

        $this->collection[$name] = $property->setName($name)->setRawType($type);

        return $this;
    }
152804
public function addColumn($name, $type, array $attributes = [])
    {
        if ($this->scope == 'alter') {
            $command = 'ADD COLUMN';
        } else {
            $command = null;
        }

        $this->sqls[] = $this->composeAddColumn(
            trim($name, '`'),
            compact('name', 'type', 'attributes', 'command')
        );

        return $this;
    }
315023
public function fetchId($type, $name)
    {
        return Inflector::dasherize($this->_parent->getName()) . '-' . Str::slug($type);
    }
446772
public function setTypes($attr, $type = null)
    {
        if (is_array($attr))
            $this->inputType = array_merge($this->inputType, $attr);
        else
            $this->inputType[$attr] = $type;

        return $this;
    }
881719
public function morphTo( $name = null, $type = null, $id = null )
	{
		// If no name is provided, we will use the backtrace to get the function name
		// since that is most likely the name of the polymorphic interface. We can
		// use that to get both the class and foreign key that will be utilized.
		if ( is_null( $name ) )
		{
			list( $current, $caller ) = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 2 );

			$name = Str::snake( $caller['function'] );
		}

		list( $type, $id ) = $this->getMorphs( $name, $type, $id );

		// If the type value is null it is probably safe to assume we're eager loading
		// the relationship. In this case we'll just pass in a dummy query where we
		// need to remove any eager loads that may already be defined on a model.
		if ( empty( $class = $this->$type ) )
		{
			return new MorphTo( $this->newQuery()->setEagerLoads( [] ), $this, $id, null, $type, $name );
		}

		// If we are not eager loading the relationship we will essentially treat this
		// as a belongs-to style relationship since morph-to extends that class and
		// we will pass in the appropriate values so that it behaves as expected.
		else
		{
			$class = $this->getActualClassNameForMorph( $class );

			$instance = new $class;

			return new MorphTo( $instance->newQuery(), $this, $id, $instance->getKeyName(), $type, $name );
		}
	}
1313791
public static function input($type, $name, $value = null, $options = array())
	{
		//if (!isset($options['name'])) $options['name'] = $name;

		// We will get the appropriate value for the given field. We will look for the
		// value in the session for the value in the old input data then we'll look
		// in the model instance if one is set. Otherwise we will just use empty.
		$id = self::getIdAttribute($name, $options);

		// Once we have the type, value, and ID we can merge them into the rest of the
		// attributes array so we can convert them into their HTML attribute format
		// when creating the HTML element. Then, we will return the entire input.
		$merge = compact('type', 'name', 'value', 'id');

		$options = array_merge($options, $merge);

		return '<input' . self::attributes($options) . ' />';
	}
575306
public function input($type = null, $name = null, $value = null)
    {
        $hasValue = $name && (! is_null($this->old($name, $value)) || ! is_null($value));

        return Input::create()
            ->attributeIf($type, 'type', $type)
            ->attributeIf($name, 'name', $this->fieldName($name))
            ->attributeIf($name, 'id', $this->fieldName($name))
            ->attributeIf($hasValue, 'value', $this->old($name, $value));
    }
1354009
public static function passive(string $name, Type $type): self
    {
        $self = new self($name, $type);
        $self->passive = true;

        return $self;
    }