diffForHumans() public method

Get the difference in a human readable format.
public diffForHumans ( Carbon\Carbon $since = null, boolean $absolute = false, $short = false ) : string
$since Carbon\Carbon
$absolute boolean Removes time difference modifiers ago, after, etc
return string
コード例 #1
-1
ファイル: Post.php プロジェクト: centaurustech/vivala
 public function getDataPostagemDiffAttribute()
 {
     $date = new Date($this->created_at);
     return $date->diffForHumans();
 }