承接 qwildz/localized-eloquent-date 相关项目开发

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

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

qwildz/localized-eloquent-date

Composer 安装命令:

composer require qwildz/localized-eloquent-date

包简介

Multi-language support for Laravel Eloquent's dates

README 文档

README

This library extends Eloquent for multi-language date support. Replace the use of Carbon in Eloquent to Laravel Date with PHP Trait. And this library support Ardent too.

Installation

Add the package to your composer.json and run composer update.

    {
        "require": {
            "qwildz/localized-eloquent-date": "dev-master"
        }
    }

Add the Laravel Date service provider in app/config/app.php:

    'Jenssegers\Date\DateServiceProvider',

And if you need, you can add an alias to use Laravel Date package:

    'Date'            => 'Jenssegers\Date\Date',

Usage

Eloquent

If your model use pure Eloquent, just change your model class to extends Qwildz\LocalizedEloquentDate\LocalizedEloquent clas.

use Qwildz\LocalizedEloquentDate\LocalizedEloquent as Model;

class MyModel extends Model {}

Ardent

Or if you use Ardent, extends Qwildz\LocalizedEloquentDate\LocalizedArdent class.

use Qwildz\LocalizedEloquentDate\LocalizedArdent as Model;

class MyModel extends Model {}

Other

You still can use the library if you don't use both above with using Qwildz\LocalizedEloquentDate\LocalizedDateTrait trait.

use Qwildz\LocalizedEloquentDate\LocalizedDateTrait;

class MyModel extends Model {
    
    use LocalizedDateTrait;

    ...
}

统计信息

  • 总下载量: 14.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固