Specify the connection name

From the Configuration Information Registration section, we already know that when registering configuration information, you can specify a `connection name' for this configuration.

You can specify the connection configuration to be used by the model class custom property connectionName. The default is default

Assume that a read connection name configuration has been registered through the configuration information registration section.

Then we can define the read connection name in the Model.

Class AdminModel extends \EasySwoole\ORM\AbstractModel
     Protected $connectionName = 'read';

You can continue to see the Reading and Writing Separation section for further details on how to use different database configurations.