busayo/laravel-yearly
A lightweight Laravel package for working with yearly cycles and annual date logic. It offers helpers for year-based queries, annual date ranges, and recurring yearly events, making calendar-year data easier to handle in your models and application.
date('Y') into your footer/copyright line so your legal notice never silently rots. This supports the decision to not hand-maintain <span>© 2015</span> across N layouts and locales—one source of truth, updated by the clock rather than by a developer.Adopt (or, more realistically, crib the idea) only when all of the following hold:
<?= date('Y') ?>.Look elsewhere—or, better, write it yourself—when:
AppServiceProvider (or Laravel's built-in @php/inline echo) reproduces this in under a minute with zero supply-chain risk.date() call is a poor trade: Composer audit surface, update friction, and abandonment risk for negligible code savings.date() wrapper, not a localization solution.2015–2026, entity names, jurisdiction variants)—that's a small internal helper with tests, not a dependency.Recommendation: Do not add as a dependency. Treat the repo as reference material and implement a one-line Blade component/helper in-house, with a unit test asserting the rendered year matches the application clock.
To executives (30 seconds): A tiny open-source utility that auto-updates the copyright year on our site footers. It saves us a recurring, low-grade "stale date" bug class across our web properties. Cost is effectively zero, and it isn't a strategic bet—think of it as office supplies, not software architecture. Note the caveat: the library is a decade old and unmaintained, so my recommendation is to spend the same 15 minutes building the equivalent ourselves rather than taking on dependency risk for one line of code.
To engineering (the real pitch): Here's a trivial convenience wrapper—a Blade directive plus config for start year and format—that removes per-layout date duplication. Don't install it; it's Laravel 5-only and last touched in 2015. Instead, register an equivalent directive in AppServiceProvider (Blade::directive('copy', fn() => "<?php echo '© '.date('Y'); ?>")) or a small Copyright helper class, add a Pest test freezing time and asserting output, and ship it. Two minutes of work, fully tested, zero new attack surface, and we can support ranges and legal entity names properly when we need them.
Bottom line: Low-risk, low-value. Adopt the pattern, not the package.
How can I help you explore Laravel packages today?