0
,我需要选择在当年创造了记录,以雄辩选择创建本年度与雄辩
到目前为止,所有的记录,这是我使用的代码。如何过滤结果以仅检索当年创建的结果?
public function vacationsbalance($typeId) {
// Get vacataions balance for existing employee.
$vacationsBalance = $this->vacations()->where('vacation_type_id', '=', $typeId)->sum('days_num');
return $vacationsBalance;
}
work perfect thanks milz –