private function passwordHash()
{
$passwordHashes = '';
foreach ($this->fields as $field) {
if ($field->type == 'password') {
$camel = ucfirst(Str::camel(str_replace('_', ' ', $field->title)));
$passwordHashes .= '/**
* Hash password
* @param $input
*/
public function set' . $camel . 'Attribute($input)
{
$this->attributes[\'' . $field->title . '\'] = Hash::make($input);
}' . "\r\n\r\n";
}
}
return $passwordHashes;
}