How to check existence of model in DB? In Yii 1 version it was so User::model()->exist()
User::model()->exist()
if(Mastersettings::find()->where(['id'=>1,'status'=>1])->exists()) { //....... Your code Here ...... }
http://yii2ideas.blogspot.in/2017/06/yii2-database-operations.html