Ambil data berdasarkan bulan dan tahun di Laravel
$date = Carbon::createFromFormat('d/m/Y', $request->salary_date);
$empsalaries = EmpSalary:: whereMonth('salary_date', $date->month)
->whereYear('salary_date', $date->year)
->get()
$date = Carbon::createFromFormat('d/m/Y', $request->salary_date);
$empsalaries = EmpSalary:: whereMonth('salary_date', $date->month)
->whereYear('salary_date', $date->year)
->get()
$post = Mjblog::whereYear('created_at', '=', $year)
->whereMonth('created_at', '=', $month)
->get();