php - There are multiple databases in laravel. How to use multiple databases in ORM?
滿天的星座
滿天的星座 2017-05-16 12:58:21
0
2
689

Using DB, you can use multiple databases using connection('mysql')

But what if you use multiple databases when using ORM?

滿天的星座
滿天的星座

reply all(2)
Peter_Zhu

When you create a Model, you can specify the connection.

protected $connection = 'connection-name';

That’s it.

洪涛

Reference https://www.36nu.com/question/34

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template