https://github.com/unicodeveloper/laravel-yearly
:copyright: :package: Laravel 5 Package that keeps your copyright up to date. Guys, it's a serious issue, no jokes!!!
https://github.com/unicodeveloper/laravel-yearly
Last synced: 5 months ago
JSON representation
:copyright: :package: Laravel 5 Package that keeps your copyright up to date. Guys, it's a serious issue, no jokes!!!
- Host: GitHub
- URL: https://github.com/unicodeveloper/laravel-yearly
- Owner: unicodeveloper
- License: mit
- Created: 2015-09-14T23:26:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-16T07:26:42.000Z (over 9 years ago)
- Last Synced: 2025-08-06T16:04:02.062Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# laravel-yearly
[](https://packagist.org/packages/busayo/laravel-yearly)

[](LICENSE.md)
[](https://travis-ci.org/busayo/laravel-yearly)
[](https://scrutinizer-ci.com/g/busayo/laravel-yearly)
[](https://packagist.org/packages/busayo/laravel-yearly)
> Laravel 5 Package to help keep your copyright year up-to-date. Simple but insanely useful.
## Install
[PHP](https://php.net) 5.5+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.
Via Composer
``` bash
$ composer require busayo/laravel-yearly
```
Another alternative is to simply add the following line to the require block of your `composer.json` file.
```
"unicodeveloper/laravel-yearly": "1.1.*"
```
Then run `composer install` or `composer update` to download it and have the autoloader updated.
Add this to your providers array in `config/app.php`
```php
// Laravel 5: config/app.php
'providers' => [
...
'Unicodeveloper\Yearly\YearlyServiceProvider',
...
];
```
This package also comes with a facade
```php
// Laravel 5: config/app.php
'aliases' => [
...
'Yearly' => 'Unicodeveloper\Yearly\YearlyFacade',
...
]
```
## Usage
Use it in your views, preferably in your footer section like this:
``` php
{{ current_year() }} // returns 2015 ( This is the current year presently )
{{ year_range(2002) }} // returns 2002 - 2015
```
For those that love Facades immensely, I have provided the cake for you :smile: like so:
``` php
{{ Yearly::current_year() }} // returns 2015 ( This is the current year presently )
{{ Yearly::year_range(2002) }} // returns 2002 - 2015
```
## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Testing
You can run the tests with:
```bash
vendor/bin/phpunit run
```
Alternatively, you can run the tests like so:
```bash
composer test
```
## Inspiration
* [Robby on Rails: Year After Year](http://www.robbyonrails.com/articles/2008/03/24/dry-a-year-after-year)
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits
- [Prosper Otemuyiwa](https://twitter.com/unicodeveloper)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.