buscar dados com base no mês e no ano em 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();