-2

I saw a method in a laravel project that convert the actual date to "xxx minutes ago"

{{ $post->created_at->diffForHumans() }}

I looked at the laravel documentation and the API but there is nothing about diffForHumans, so what is the source of this method, how to know if there is another method that works that kind of tasks, is there any source beside the documentation that are contain those small tasks

apache
  • 113
  • 1
  • 1
  • 5

1 Answers1

3

That's part of the Carbon library Laravel uses to manage its Eloquent timestamp fields.

And it is specified in the documentation: http://laravel.com/docs/4.2/eloquent#date-mutators

Bogdan
  • 43,166
  • 12
  • 128
  • 129