I know we can specify a mysql connection for a particular model by setting
protected $connection = 'my_db';
But is there a way to specify a different connection than what the model is using for a specific method.
For example if my model is using my_db
as default connection, but I want model method foo()
to use a different connection my_db1
. How do I do it?