src/Services/InputMaker.php
public function create($name, $config, $object = null, $class = null, $reformatted = false, $populated = true)
    {
        $defaultConfig = include __DIR__.'/../../config/form-maker.php';

        if (is_null($class)) {
            $class = config('form-maker.forms.form-class', 'form-control');
        }

        $inputConfig = [
            'populated' => $populated,
            'name' => $this->inputCalibrator->getName($name, $config),
            'id' => $this->inputCalibrator->getId($name, $config),
            'class' => $this->prepareTheClass($class, $config),
            'config' => $config,
            'inputTypes' => Config::get('form-maker.inputTypes', $defaultConfig['inputTypes']),
            'inputs' => $this->getInput(),
            'object' => $object,
            'objectValue' => $this->getObjectValue($object, $name),
            'placeholder' => $this->inputCalibrator->placeholder($config, $name),
        ];

        $inputConfig = $this->refineConfigs($inputConfig, $reformatted, $name, $config);

        return $this->inputStringPreparer($inputConfig);
    }
public function create($name, $config, $object = null, $class = null, $reformatted = false, $populated = true)
    {
        $defaultConfig = include __DIR__.'/../../config/form-maker.php';

        if (is_null($class)) {
            $class = config('form-maker.forms.form-class', 'form-control');
        }

        $inputConfig = [
            'populated' => $populated,
            'name' => $this->inputCalibrator->getName($name, $config),
            'id' => $this->inputCalibrator->getId($name, $config),
            'class' => $this->prepareTheClass($class, $config),
            'config' => $config,
            'inputTypes' => Config::get('form-maker.inputTypes', $defaultConfig['inputTypes']),
            'inputs' => $this->getInput(),
            'object' => $object,
            'objectValue' => $this->getObjectValue($object, $name),
            'placeholder' => $this->inputCalibrator->placeholder($config, $name),
        ];

        $inputConfig = $this->refineConfigs($inputConfig, $reformatted, $name, $config);

        return $this->inputStringPreparer($inputConfig);
    }
public function create ( $ name , $ config , $ object = null , $ class = null , $ reformatted = false , $ populated = true ) { $ defaultConfig = include __DIR__ . '/../../config/form-maker.php' ; if ( is_null ( $ class ) ) { $ class = config ( 'form-maker.forms.form-class' , 'form-control' ) ; } $ inputConfig = [ 'populated' => $ populated , 'name' => $ this -> inputCalibrator -> getName ( $ name , $ config ) , 'id' => $ this -> inputCalibrator -> getId ( $ name , $ config ) , 'class' => $ this -> prepareTheClass ( $ class , $ config ) , 'config' => $ config , 'inputTypes' => Config :: get ( 'form-maker.inputTypes' , $ defaultConfig [ 'inputTypes' ] ) , 'inputs' => $ this -> getInput ( ) , 'object' => $ object , 'objectValue' => $ this -> getObjectValue ( $ object , $ name ) , 'placeholder' => $ this -> inputCalibrator -> placeholder ( $ config , $ name ) , ] ; $ inputConfig = $ this -> refineConfigs ( $ inputConfig , $ reformatted , $ name , $ config ) ; return $ this -> inputStringPreparer ( $ inputConfig ) ; }
Create the input HTML.

@param string       $name        Column/ Input name
@param array        $config      Array of config info for the input
@param object|array $object      Object or Table Object
@param string       $class       CSS class
@param bool         $reformatted Clean the labels and placeholder values
@param bool         $populated   Set the value of the input to the object's value

@return string
Create the input HTML .