2017 © Pedro Peláez
 

library laravel-yearly

Provides helper function to get the current year and a range of years

image

busayo/laravel-yearly

Provides helper function to get the current year and a range of years

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

laravel-yearly

Latest Stable Version License Build Status Quality Score Total Downloads, (*1)

Laravel 5 Package to help keep your copyright year up-to-date. Simple but insanely useful., (*2)

Install

PHP 5.5+ or HHVM 3.3+, and Composer are required., (*3)

Via Composer, (*4)

``` bash $ composer require busayo/laravel-yearly, (*5)


Another alternative is to simply add the following line to the require block of your `composer.json` file.

"unicodeveloper/laravel-yearly": "1.1.*", (*6)


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, (*7)


// Laravel 5: config/app.php 'aliases' => [ ... 'Yearly' => 'Unicodeveloper\Yearly\YearlyFacade', ... ]

Usage

Use it in your views, preferably in your footer section like this:, (*8)

``` php, (*9)

{{ current_year() }} // returns 2015 ( This is the current year presently ), (*10)

{{ year_range(2002) }} // returns 2002 - 2015, (*11)



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 for more information what has changed recently., (*12)

Testing

You can run the tests with:, (*13)

vendor/bin/phpunit run

Alternatively, you can run the tests like so:, (*14)

composer test

Inspiration

Contributing

Please see CONTRIBUTING for details., (*15)

Credits

License

The MIT License (MIT). Please see License File for more information., (*16)

The Versions

16/04 2016

dev-master

9999999-dev https://github.com/unicodeveloper/laravel-yearly

Provides helper function to get the current year and a range of years

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

laravel copyright year footer laravel-yearly yearafteryear unicodeveloper

25/10 2015

1.1.0

1.1.0.0 https://github.com/busayo/laravel-yearly

Provides helper function to get the current year and a range of years

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

laravel copyright year footer laravel-yearly yearafteryear busayo

15/09 2015

1.0.1

1.0.1.0 https://github.com/busayo/laravel-yearly

Provides helper function to get the current year and a range of years

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

laravel copyright year footer laravel-yearly yearafteryear busayo

15/09 2015

1.0.0

1.0.0.0 https://github.com/busayo/laravel-yearly

Provides helper function to get the current year and a range of years

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

laravel-yearly busayo