rinvex / laravel-repositories

⚠️ [ABANDONED] Rinvex Repository is a simple, intuitive, and smart implementation of Active Repository with extremely flexible & granular caching system for Laravel, used to abstract the data layer, making applications more flexible to maintain.
https://rinvex.com
MIT License
666 stars 115 forks source link

Swap database connection on the fly #71

Closed ghost closed 8 years ago

ghost commented 8 years ago

We could add a getter and a setter for a property on the BaseRepository and call setConnection on the model underneath.

A quick example could be $repository->setConnection('sqlsrv')->....

I'd add a default fallback configuration key to rinvex.repository.php

Omranic commented 8 years ago

Implemented & merged into develop, @ionut-tanasa you can test it & tell me if there's any notes 👍

ghost commented 8 years ago

@Omranic awesome! Will test soon. I have just the right example at work :)