$materials = Material::find()
->where(['in', 'Material.MaterialId', $value])
->joinWith(['objectName'])
->all();
$product = Product::find()
->where(['Product.productId' => $id, 'Product.ModelId' => $mid])
->joinWith(['product' => function ($query) {
$query->joinWith([
'objectName',
'contents' => function ($query2) {
$query2->joinWith(['material' => function ($query3) {
$query3->where(['in', 'Material.MaterialId', $value])
->joinWith(['objectName']);
}]);
},
])
->all();
}])
->one();
$materials = Material::find()
->where(['in'