add some api method

This commit is contained in:
iIronside
2022-01-11 14:49:32 +03:00
parent 13a9bdcca0
commit 920aa2e751
5 changed files with 180 additions and 4 deletions

View File

@ -51,8 +51,10 @@ class DocumentController extends Controller
}
$document = Document::find()
->where(['document.id' => $document_id])
->all();
->joinWith(['documentFieldValues.field'])
->where(['document.id' => $document_id])
->asArray()
->all();
if(empty($document)) {
throw new NotFoundHttpException('There is no such document');