Carbon - get first day of month

Solution 1:

You can use following function

$start = Carbon::now()->startOfMonth();
$end = Carbon::now();

Solution 2:

Try as

$start = new Carbon('first day of this month');

CARBON DOCS Refer #Testing Aids

If you already have Carbon object and want to find first day of month for that object you can try as,

$startDate = Carbon::now(); //returns current day
$firstDay = $startDate->firstOfMonth();