Answers for "fetch data based on month and year in laravel"

PHP
0

fetch data based on month and year in laravel

$date = Carbon::createFromFormat('d/m/Y', $request->salary_date);

$empsalaries = EmpSalary:: whereMonth('salary_date', $date->month)
    ->whereYear('salary_date', $date->year)
    ->get()
Posted by: Guest on October-13-2020
0

fetch data based on month and year in laravel

$post = Mjblog::whereYear('created_at', '=', $year)
              ->whereMonth('created_at', '=', $month)
              ->get();
Posted by: Guest on October-13-2020

Code answers related to "fetch data based on month and year in laravel"

Browse Popular Code Answers by Language