Created
August 15, 2023 15:58
-
-
Save moaalaa/395340b1e1bd00ccdb31d64b85dcac98 to your computer and use it in GitHub Desktop.
Carbon translated locale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Will format bu in en lang | |
$model->created_at->format('M, Y'); | |
// Will translate the format to ar lang | |
$model->created_at->locale('ar')->translatedFormat('M, Y'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment