public function fetch()
{
$todaydate = date('Y-m-d');
$today=DB::table('mirhusen')->where('date',$todaydate)->sum('amount');
$month=DB::table('mirhusen')->where('date','Like', date('Y-m').'%')->sum('amount');
$lastyear=DB::table('mirhusen')->whereYear('date', date('Y')-1)->sum('amount');
$thisyear=DB::table('mirhusen')->whereYear('date', date('Y'))->sum('amount');
dd($month);
return $today;
}
0 Comments