In Yii2, to use findOne() to grab a single record with exact match is simple. For example:
// find the first customer whose age is 30 and whose status is 1
$customer = Customer::findOne(['age' => 30, 'status' => 1]);
findOne will not directly handle this.
You can do it as follows:
$customer = Customer::find()->andWhere(['>', 'age', 30])->andWhere(['status' => 1])->one();