Because you are not using eloquent your time-stamps will not be returned as Carbon instance but as string.
As as stated Carbon::instance() takes instance of DateTime so do this :
$next_date = Carbon::instance( new DateTime( $date_time ) )->addMonth($month_due);
It should be addMonths() in my case. Thank you it worked :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community