承接 busayo/laravel-yearly 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

busayo/laravel-yearly

最新稳定版本:1.1.0

Composer 安装命令:

composer require busayo/laravel-yearly

包简介

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

README 文档

README

Latest Stable Version License Build Status Quality Score Total Downloads

Laravel 5 Package to help keep your copyright year up-to-date. Simple but insanely useful.

Install

PHP 5.5+ or HHVM 3.3+, and Composer are required.

Via Composer

$ 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

// Laravel 5: config/app.php

'providers' => [
    ...
    'Unicodeveloper\Yearly\YearlyServiceProvider',
    ...
];

This package also comes with a facade

// Laravel 5: config/app.php

'aliases' => [
    ...
    'Yearly' => 'Unicodeveloper\Yearly\YearlyFacade',
    ...
]

Usage

Use it in your views, preferably in your footer section like this:

{{ 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 😄 like so:

{{ 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.

Testing

You can run the tests with:

vendor/bin/phpunit run

Alternatively, you can run the tests like so:

composer test

Inspiration

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

  • 总下载量: 4.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固