protected function findModel($id) { if (($model = OrderSearch::findOne($id)) !== null) { return $model; } else { throw new Exception('This not found'); } }