I want to add nesbot/carbon ti magento 2.3.5 and i don't know how. I'd be appreciated for your helps.

1 Answer 1


See here: https://packagist.org/packages/nesbot/carbon

All you need to do is composer require the package from the Magento root folder. It may not be installable if it has un-met dependency requirements:

composer require nesbot/carbon

Then in your php code:


namespace Vendor\Module\Model;

use Carbon\Carbon;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.