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
Hello github :) |
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 | |
function diffForHumans($time) | |
{ | |
$get_en = \Carbon::createFromTimeStamp( $time )->diffForHumans(); | |
$set_fa = str_replace('years','سال',$get_en); | |
$set_fa = str_replace('months','ماه',$set_fa); | |
$set_fa = str_replace('weeks','هفته',$set_fa); | |
$set_fa = str_replace('days','روز',$set_fa); | |
$set_fa = str_replace('hours','ساعت',$set_fa); |