A simple statamic fieldtype to display readonly last modified date.
- Copy the "LastModified" folder to your Statamic
site/addons
directory - Run
php please update:addons
to load the addons dependencies.
You can configure the addon by visiting CP > Addons > Show last modified:
- Date format - the date format you want the last modified to be represented in.
For full reference of the supported format character and results, see the documentation of date(): php_date
- add a
type: last_modified
field to the top level of your fieldset.
In your fieldtype, it has to be a top level field, otherwise it will not work!
sections:
main:
display: "Main"
fields:
show_last_modified:
type: last_modified
display: Last modified
this will result in something like:
Icons made by Freepik from www.flaticon.com