if(isset($params['date'])) | if(isset($params['date'])) | ||||
$commandes = $commandes->where(['production.date' => $date]); | |||||
$commandes = $commandes->where(['production.date' => $params['date']]); | |||||
if(isset($params['order'])) | if(isset($params['order'])) | ||||
$commandes = $commandes->orderBy('date '.$params['order']); | $commandes = $commandes->orderBy('date '.$params['order']); |