Level 48
You can set which database connection to use for a model by adding the following to the model class.
protected $connection = 'connection-name';
You will need to add this to any models that shouldn't use the default connection.
hi i have to two database in project so some times i want you mysql for my user auth ,sometimes use sqlite but i cant change in controllers please help me
Please or to participate in this conversation.