softspring/time-ago-bundle
Softspring TimeAgoBundle adds a simple Twig filter for rendering dates and timestamps as human-friendly relative time, such as “5 minutes ago” or “2 days ago.” It helps Symfony applications show compact, readable age labels in templates without custom date logic.
composer require softspring/time-ago-bundle. Note the name: this is a Symfony bundle, not a Laravel package. There is no ServiceProvider, no config/time-ago.php to publish, and no package discovery entry.vendor/softspring/time-ago-bundle/README.md, then DependencyInjection/ (config tree + service wiring) and any Twig/ directory (the filter/extension is usually the public surface). Those three files tell you the entire usable API.$post->created_at->diffForHumans() produces the same "3 hours ago" output with locale support from app()->getLocale(). For most Laravel codebases this package is redundant.{{ $post->created_at->diffForHumans() }}. Add ->diffForHumans(short: true) for "3h ago" style output.Attribute::make(get: fn () => $this->created_at->diffForHumans())) or a TimeAgo helper class, so you can change phrasing or locale in one place.created_at as ISO-8601 alongside created_at_human, otherwise clients can't sort or re-render.<time datetime="..."> that JS rewrites, and keep the server string as the no-JS fallback.Carbon::setTestNow() before asserting on the string, and assert against a fixed locale (app()->setLocale('en')), otherwise tests break under a different default locale in CI.compare/v5.5.10...v5.6.0 link. Read the actual diff before bumping. Per semver it's a minor release (additive only), but nothing in the published notes confirms that; treat it as unverified.app()->getLocale(); the Symfony bundle reads the translator service. If both are in play you'll get inconsistent strings for the same timestamp.diffForHumans() on a Carbon instance already converted to the display timezone. diffForHumans() on a naive local string stored as UTC is silently off by the offset — a very common bug with "just now" labels."5.5.*") and a manual diff review is safer than floating on ^5.6 until you've confirmed the change set.How can I help you explore Laravel packages today?