N
N
NubasLol2019-01-16 19:09:32
Laravel
NubasLol, 2019-01-16 19:09:32

Carbon add days/months?

Is it possible to replace in carbon
$date->addMonth() ,
by add(count, 'm') . Where instead of m there will be days, years, months

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin B., 2019-01-16
@NubasLol

Almost at the very beginning of the documentation

$date = Carbon::now();
$date->add(1, 'day');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question