From 17e1456ee7dff9681a37df52a596949402476f97 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sun, 12 Feb 2023 21:41:40 +0100 Subject: [PATCH] Add markup tag --- Plugin.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Plugin.php b/Plugin.php index b802d7e..daeca1f 100644 --- a/Plugin.php +++ b/Plugin.php @@ -3,6 +3,7 @@ namespace Zoomyboy\Event; use Backend; +use Carbon\Carbon; use System\Classes\PluginBase; /** @@ -106,6 +107,17 @@ class Plugin extends PluginBase ]; } + public function registerMarkupTags(): array + { + return [ + 'filters' => [ + 'date' => function ($date) { + return Carbon::parse($date)->format('d.m.Y'); + }, + ], + ]; + } + public function registerMailTemplates() { return [