Why not just use Carbon to do this?
Carbon::now()->addMonths(2);
When i use this method in laravel 4, there is a class not found error
soclosed said:
When i use this method in laravel 4, there is a class not found error
You need a use statement at the top of your class:
use Carbon\Carbon;
I heard that in laravel 4.1, carbon was already. It's wrong ?
Carbon
is included with Laravel 4.1, but to use it you need to have use Carbon\Carbon
at the top of your file.
I tried this, but it didn't add two month at the current. It still the current date insert in MySQL
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community