laravel database connection returns undefined index error

前端 未结 6 1118
野趣味
野趣味 2021-01-22 16:53

I am developing a project using laravel 4 framework. In my database.php file I get the following error:

  Undefined index: driver 

And my conne

6条回答
  •  独厮守ぢ
    2021-01-22 17:17

    If you have multiple different connections (for example to multiple databases on the same host) and it doesn't make sense to set a default connection, you can specify a connection in the Model class.

    This would be on the of the connections defined in config/database.php.

提交回复
热议问题