Skip to content

Commit

Permalink
Update SQL Version Call
Browse files Browse the repository at this point in the history
This is causing an issue for Postgres, when you select `version()`, its returning the result as `version`. Setting the `as` on the statement fixes this issue.
  • Loading branch information
djekl authored Jul 18, 2022
1 parent 5a37cbe commit 7e91d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/VersionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ private function getDatabase()
return 'Unkown';
}

$results = DB::select(DB::raw("select version()"));
$results = DB::select(DB::raw("select version() as version"));

return $results[0]->{'version()'};
return $results[0]->version;
}
}

0 comments on commit 7e91d7b

Please sign in to comment.