Skip to content

Instantly share code, notes, and snippets.

@amberlex78
Last active December 15, 2021 07:52
Show Gist options
  • Save amberlex78/beb3cb307a7dbaec87cfb1067382ad27 to your computer and use it in GitHub Desktop.
Save amberlex78/beb3cb307a7dbaec87cfb1067382ad27 to your computer and use it in GitHub Desktop.
Laravel: Get mysql version
<?php
$v = \DB::select("select version()")[0]->{"version()"};
$v = explode('-', $v)[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment