Support for hostnames in database connection field.
This commit is contained in:
parent
c107dbfa74
commit
f6275058d0
1 changed files with 5 additions and 0 deletions
|
@ -231,6 +231,11 @@ class DatabaseRepository {
|
|||
*/
|
||||
public function add(array $data)
|
||||
{
|
||||
|
||||
if (isset($data['host'])) {
|
||||
$data['host'] = gethostbyname($data['host']);
|
||||
}
|
||||
|
||||
$validator = Validator::make($data, [
|
||||
'name' => 'required|string|max:255',
|
||||
'host' => 'required|ip|unique:database_servers,host',
|
||||
|
|
Loading…
Reference in a new issue