Call to a member function diffForHumans() on string in

PHP
// Larvel - call diffForHumans() function on string
$date = $info->created_at;
{{ \Carbon\Carbon::parse($date)->diffForHumans() }}
Source

Also in PHP: