Answer the question
In order to leave comments, you need to log in
How to work with different databases in Eloquent ORM?
Hello. Faced a small problem. There are 2 DB. One sqlite second mysql. The default is sqlite. I want to add data to mysql database. I make a request
But the request goes not to mysql, but to sqlite because of this an error appears that there is no such table.
That also doesn't workFirm::on('mysql')->create($request->all());
$firm->name = $request->name;
.....
$firm->url = $request->url;
$firm->on('mysql')->save();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question