Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 683 Bytes

time-templates.md

File metadata and controls

15 lines (12 loc) · 683 Bytes

Time templates

There's a view for rendering <time> tags to which you supply a Carbon $carbon variable and it prints a proper datetime atom string attribute and by default a human readable time difference.

@include('kontour::elements.time', ['carbon' => \Carbon\Carbon::now()])

You may also pass a $format string to display the tag contents in a specific format instad of the default relative time. If you pass ['format' => true] the default format from Kontour's config file will be used.