db\ActiveRecord getDb()

getDb() public static method

Returns the database connection used by this AR class.

By default, the "db" application component is used as the database connection. You may override this method if you want to use a different database connection.

public static yii\db\Connection getDb ( )
return yii\db\Connection

The database connection used by this AR class.

doc_Yii
2016-10-30 16:56:20
Comments
Leave a Comment

Please login to continue.