Reputation: 730
I want to get the time after 20 minutes from now using carbon in laravel. How can I do that?
$minutes = 20;
$delivery_time =Carbon::now()->add($minutes,'minute')->format('h:m');
Upvotes: 1
Views: 2111
Reputation: 422
Try using this:
Carbon::now()->addMinutes($minutes)->format('h:m')
Documentation: https://carbon.nesbot.com/docs/
Upvotes: 3