1Try to parse() it first:
2$date = Carbon::parse($dateTime)
3 ->addSeconds($seconds)
4 ->format('Y-m-d H:i:s');
1$period = CarbonPeriod::create('2018-06-14', '2018-06-20');
2
3// Iterate over the period
4foreach ($period as $date) {
5 echo $date->format('Y-m-d');
6}
7
8// Convert the period to an array of dates
9$dates = $period->toArray();