src/Commands/CrudLangCommand.php
private function templateVars($newLangFile)
    {
        $messages = [];
        foreach ($this->formFields as $field) {
            $index = $field['name'];
            $text = ucwords(strtolower(str_replace('_', ' ', $index)));
            $messages[] = "'$index' => '$text'";
        }

        File::put($newLangFile, str_replace('%%messages%%', implode(",\n", $messages), File::get($newLangFile)));
    }
private function templateVars($newLangFile)
    {
        $messages = [];
        foreach ($this->formFields as $field) {
            $index = $field['name'];
            $text = ucwords(strtolower(str_replace('_', ' ', $index)));
            $messages[] = "'$index' => '$text'";
        }

        File::put($newLangFile, str_replace('%%messages%%', implode(",\n", $messages), File::get($newLangFile)));
    }
private function templateVars ( $ newLangFile ) { $ messages = [ ] ; foreach ( $ this -> formFields as $ field ) { $ index = $ field [ 'name' ] ; $ text = ucwords ( strtolower ( str_replace ( '_' , ' ' , $ index ) ) ) ; $ messages [ ] = "'$index' => '$text'" ; } File :: put ( $ newLangFile , str_replace ( '%%messages%%' , implode ( ",\n" , $ messages ) , File :: get ( $ newLangFile ) ) ) ; }
Translate form's fields.

@param  string $newLangFile

@return void
Translate form s fields .