定制 flobbos/laravel-datable 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

flobbos/laravel-datable

Composer 安装命令:

composer require flobbos/laravel-datable

包简介

A tiny Laravel package for easily switching localized dates

README 文档

README

Laravel Databale

For easy date localization

If you have trouble working with localized date formats used in combination with translations then this package might be for you. It simply provides a trait that you can add to your models which use https://github.com/jenssegers/date to provide localized date outputs.

Docs

Installation

Install the package

composer require flobbos/laravel-datable

That's it. Nothing else to do at this point.

Usage

Add it to the model

    namespace App;

    use Illuminate\Database\Eloquent\Model;
    use Flobbos\Datable;

    class Event extends Model {

        use Datable\Datable;

        protected $dates = [
            'starts_on',
            'ends_on'
        ];


    }

This is all you need to do to make it work. You won't notice a difference anywhere except when you're pulling formats like this:

    $your_model->starts_on->format('d. F Y');

The output will then have the localized month name instead of the default English.

Laravel compatibility

Laravel Crudable
5.6 >=0.4
5.5 >=0.4
5.4 >=0.4
5.3 >=0.4
5.2 >=0.1
5.1 >=0.1

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固