protected function findModel($where) { if (($model = Profit::find()->where($where)->one()) !== null) { return $model; } else { return; } }