protected function getMutators(array $fields = null)
    {
        $mutators = [];

        foreach ($fields as $field) {
            if ($field->isAutoManaged()) {
                continue;
            }

            if ($field->isMultipleAnswers()) {
                $content = $this->getStubContent('model-mutator-multiple-answers');
                $this->replaceFieldName($content, $field->name);

                $mutators[] = $this->getMutator($field, $content);
            }

            if ($field->isDateOrTime()) {
                $content = $this->getStubContent('model-mutator-datetime');
                $this->replaceFieldName($content, $field->name);

                $mutators[] = $this->getMutator($field, $content);
            }
        }

        return implode(PHP_EOL, $mutators);
    }
protected function getMutators(array $fields = null)
    {
        $mutators = [];

        foreach ($fields as $field) {
            if ($field->isAutoManaged()) {
                continue;
            }

            if ($field->isMultipleAnswers()) {
                $content = $this->getStubContent('model-mutator-multiple-answers');
                $this->replaceFieldName($content, $field->name);

                $mutators[] = $this->getMutator($field, $content);
            }

            if ($field->isDateOrTime()) {
                $content = $this->getStubContent('model-mutator-datetime');
                $this->replaceFieldName($content, $field->name);

                $mutators[] = $this->getMutator($field, $content);
            }
        }

        return implode(PHP_EOL, $mutators);
    }
protected function getMutators ( array $ fields = null ) { $ mutators = [ ] ; foreach ( $ fields as $ field ) { if ( $ field -> isAutoManaged ( ) ) { continue ; } if ( $ field -> isMultipleAnswers ( ) ) { $ content = $ this -> getStubContent ( 'model-mutator-multiple-answers' ) ; $ this -> replaceFieldName ( $ content , $ field -> name ) ; $ mutators [ ] = $ this -> getMutator ( $ field , $ content ) ; } if ( $ field -> isDateOrTime ( ) ) { $ content = $ this -> getStubContent ( 'model-mutator-datetime' ) ; $ this -> replaceFieldName ( $ content , $ field -> name ) ; $ mutators [ ] = $ this -> getMutator ( $ field , $ content ) ; } } return implode ( PHP_EOL , $ mutators ) ; }
Gets mutators for each field that accepts multiple answers.

@param  array  $fields

@return string
Gets mutators for each field that accepts multiple answers .