Yii2 check if record exists with where condition

yii2
voted: 2
vote
yii2 php

Yii2 check if record exists with where condition

$exists = ModelName::find()->where([ 'column_name' => $value])->andWhere(['column_name' => $value])->exists();
//returns true or false
working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.