factory() public static method

Create a new field of type $type and name $name and label $label.
public static factory ( string $type, string $name, string $label = null ) : object
$type string
$name string lower case and underscore-delimited
$label string (optional) Automatically generated from $name if not present
return object $field
Exemplo n.º 1
0
 /**
  * A proxy for the abstract field factory method.
  *
  * @see Carbon_Fields\Field\Field::factory()
  **/
 public static function factory($type, $name, $label = null)
 {
     return Abstract_Field::factory($type, $name, $label);
 }