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 –