addHelperFunction('format', function () { return Format::getInstance(); }); $this->addHelperFunction('timeSince', function ($timestamp) { return '' . Format::timeSince($timestamp) . ''; }); $this->addHelperFunction('timeSincePrefix', function ($timestamp) { return '' . $this->translate(Format::timeSincePrefix($timestamp)) . ' '; }); $this->addHelperFunction('timeUnless', function ($timestamp) { if (! $timestamp) return ''; return '' . Format::timeUntil($timestamp) . ''; }); $this->addHelperFunction('timeUnlessPrefix', function ($timestamp) { if (! $timestamp) return ''; return '' . $this->translate(Format::timeUntilPrefix($timestamp)) . ''; });