I have one of these: https://laravel.com/api/5.0/Illuminate/Database/MySqlConnection.html
I need one of these: https://laravel.com/api/master/Illuminate/Database/Capsule/Manager.html
This is within a Laravel project. Basically, I want to get or create a Capsule\Manager object that uses the existing DB connection. What is the simplest way to do this?
My thoughts/efforts so far:
I can see that the Manager class has an addConnection() method: https://laravel.com/api/master/Illuminate/Database/Capsule/Manager.html#method_addConnection
However, this method takes an array of configuration options as the parameter.
If I could somehow get this array from my Connection instance, then I could create a new Manager and pass it the array. However, I can't find a way to get this configuration array out of the Connection. And ideally I would like to use the same connection, having to retrieve and pass a configuration array seems very roundabout. Still, I don't mind doing it that way if there is no better way.