php - Carbon - get first day of month -


i using carbon trying first day of month can run report beginning of month till current day.

    $date = [         'start' => new \carbon\carbon('last month'),         'end' => new \carbon\carbon('today')     ]; 

the above code show todays date same date in previous month. want 1st now.

is there easy way above? cant find in docs.

try as

$start = new carbon('first day of month') 

carbon docs refer #testing aids


Comments