skip to Main Content

Laravel date cast

Hello Every I want to use Laravel default casts feature, where if I access created_at property of a post model. I would like the following output from the following code: Code: $timepassed = $post->created_at; Desired Output: 2 hours ago The…

VIEW QUESTION
Back To Top
Search