Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel carbon created_at date in current month

public function myMonthApts()
{
        return $this->appointments()
                        ->whereIn('status_id', [3,4])
                        ->whereYear('created_at', Carbon::now()->year)
                        ->whereMonth('created_at', Carbon::now()->month)
                        ->count();
}
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #laravel #carbon #date #current #month
ADD COMMENT
Topic
Name
1+9 =