mmeshkatian/persian-carbon is a Laravel package for carbon persian date.
It currently has 2 GitHub stars and 28 downloads on Packagist (latest version 1.0.0).
Install it with composer require mmeshkatian/persian-carbon.
Discover more Laravel packages by mmeshkatian
or browse all Laravel packages to compare alternatives.
Last updated
A simple wrapper to convert Carbon dates to jalali date.
its uses morilog/jalali package
Install the package through Composer.
Run the Composer require command from the Terminal:
composer require mmeshkatian/persian-carbon
If you're using Laravel > 5.5, this is all there is to do.
Should you still be on version 5.4 of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your config/app.php file.
Add a new line to the providers array:
Mmeshkatian\Ariel\PersianCarbonServiceProvider::class
Now you're ready to start using the persian carbon in your application.
you can simply convert Carbon to persian date
<?php
echo now()->toPersian()->format("Y-m-d")
Made With ❤️