Skip to content

Instantly share code, notes, and snippets.

@fatgy
Created March 25, 2014 08:29
Show Gist options
  • Save fatgy/8cc6b50c351ec8da86ef to your computer and use it in GitHub Desktop.
Save fatgy/8cc6b50c351ec8da86ef to your computer and use it in GitHub Desktop.
Laravel snippet
//Check db connection
if(DB::connection()->getDatabaseName())
{
echo "conncted sucessfully to database ".DB::connection()->getDatabaseName();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment