vendredi 3 avril 2020

Laravel 5 Getting the Database Name

I wish to have access to the name of the database at runtime, so as a helper I have the following function:

function getDatabaseName()
{
  $name = \DB::connection()->getDatabaseName();
  return $name;
}

but it returns a blank.

Any ideas please?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire