2016-09-18 80 views
3

的數據庫憑據我是新來laravel(V5.3)顯示在laravel

我是偶然這個問題,(我仍然在發展模式)

我跑我的應用程序及其工作正常,但當數據庫被關閉時,我得到這個錯誤

in Connector.php line 119 
at PDO->__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->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->createConnection('mysql:host=127.0.0.1;port=3306;dbname=social', array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'social', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'name' => 'mysql'), array('0', '2', '0', false, false)) in MySqlConnector.php line 24 
at MySqlConnector->connect(array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'social', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'name' => 'mysql')) in ConnectionFactory.php line 100 

我很驚訝,當我看到數據庫憑據。

此錯誤在生產模式下是否保持不變?

有沒有什麼辦法可以停止顯示數據庫連接信息?

+0

禁用調試 – Sherif

回答

2

在您的生產中設置APP_DEBUG.envfalse