You could use Carbon.
Carbon allows you to add a month to a date rather easily.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm creating a rental property project with laravel to practice more advanced techniques what I'm stuck on is this. When creating a new renter you are able to select the due date, I'm trying to figure out how I can make a process automatic once the month has changed the due date column in the database should update to the new month so let's say rent is due 12/5/2018 how could I go about getting the new month change and updating to 1/5/2018?
Carbon has several handy methods for adding and subtracting time:
$dueDate = '12/5/2018';
$newDueDate = Carbon::parse($dueDate)->addMonth();
EDIT: snap @jdunsmore !
Please or to participate in this conversation.