We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01a64a6 commit 5dbb9f1Copy full SHA for 5dbb9f1
app/Support/helpers.php
@@ -53,4 +53,8 @@ class="form-control"
53
</div>
54
55
<?php
56
-}
+}
57
+
58
+function note_creation_date(Carbon\Carbon $date) {
59
+ return $date->diffInDays() > 7 ? $date->format(trans('app.date')) : $date->diffForHumans();
60
resources/views/note/single.blade.php
@@ -20,7 +20,7 @@
20
<a href="{!! route('note', ['id' => $note->id]) !!}"
21
data-toggle="tooltip"
22
title="{{ $note->created_at->format(trans('app.datetime')) }}">
23
- @icon('clock-o') {{ $note->created_at->diffForHumans() }}
+ @icon('clock-o') {{ note_creation_date($note->created_at) }}
24
</a>
25
@if ($state != 'default' && $state != 'success')
26
<span class="note-expired">
0 commit comments