@@ -556,6 +556,8 @@ class DocumentController extends BackendController | |||
$model = $class::searchOne([ | |||
'id' => $id | |||
], [ | |||
'orderby' => 'teshtygjhtyt' | |||
]); | |||
if ($model) { |
@@ -137,7 +137,8 @@ class Order extends ActiveRecordCommon | |||
public function getProductOrder() | |||
{ | |||
return $this->hasMany(ProductOrder::className(), ['id_order' => 'id']) | |||
->with('product'); | |||
->orderBy(['product.order' => SORT_DESC]) | |||
->joinWith('product'); | |||
} | |||
public function getDistribution() |