How to configure master-slave db connection

Hi,

I want to configure mysql master and slave dbs.

How can i configure yii2 for insert,delete,update on master db and for read on slave dbs?

UPDATE: I found the answer on Yii2 Guide

Thank you.