Skip to content

Commit f627505

Browse files
committed
Support for hostnames in database connection field.
1 parent c107dbf commit f627505

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/Repositories/DatabaseRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ public function delete($server)
231231
*/
232232
public function add(array $data)
233233
{
234+
235+
if (isset($data['host'])) {
236+
$data['host'] = gethostbyname($data['host']);
237+
}
238+
234239
$validator = Validator::make($data, [
235240
'name' => 'required|string|max:255',
236241
'host' => 'required|ip|unique:database_servers,host',

0 commit comments

Comments
 (0)