Showing the DB credentials in laravel
<p>I'm new to laravel (v5.3)</p>

<p>I got this issue by accident, (I still in development mode)</p>

<p>I ran my app and its worked correctly, but when the DB was turned off, I get this error</p>

<pre><code>in Connector.php line 119
at PDO-&gt;__construct('mysql:host=127.0.0.1;port=3306;dbname=social', 'root', '', array('0', '2', '0', false, false)) in Connector.php line 119
at Connector-&gt;createPdoConnection('mysql:host=127.0.0.1;port=3306;dbname=social', 'root', '', array('0', '2', '0', false, false)) in Connector.php line 56
at Connector-&gt;createConnection('mysql:host=127.0.0.1;port=3306;dbname=social', array('driver' =&gt; 'mysql', 'host' =&gt; '127.0.0.1', 'port' =&gt; '3306', 'database' =&gt; 'social', 'username' =&gt; 'root', 'password' =&gt; '', 'charset' =&gt; 'utf8', 'collation' =&gt; 'utf8_unicode_ci', 'prefix' =&gt; '', 'strict' =&gt; true, 'engine' =&gt; null, 'name' =&gt; 'mysql'), array('0', '2', '0', false, false)) in MySqlConnector.php line 24
at MySqlConnector-&gt;connect(array('driver' =&gt; 'mysql', 'host' =&gt; '127.0.0.1', 'port' =&gt; '3306', 'database' =&gt; 'social', 'username' =&gt; 'root', 'password' =&gt; '', 'charset' =&gt; 'utf8', 'collation' =&gt; 'utf8_unicode_ci', 'prefix' =&gt; '', 'strict' =&gt; true, 'engine' =&gt; null, 'name' =&gt; 'mysql')) in ConnectionFactory.php line 100
</code></pre>

<p>I'm surprised when I see the DB credentials. </p>

<p>Does this error stay like that in production mode?</p>

<p>Is there any way to stop showing DB connection info?</p>