#Override model's crud functions so they will happen on two different databases.

4 messages · Page 1 of 1 (latest)

latent root
#

Hey guys,
What I want is when I create, update, or delete a model (not all of them) it will happen on the main database connection + on another connection.
I tried to override the crud functions of the models but I didn't succeed.

boreal moth
#

what about creating an Observer for the model?

fallen sierra
#

Out of curiosity, what is your use case? Perhaps you could just use replication directly on the database server instead of trying to "hack" something together.