chrisdicarlo/eloquent-human-timestamps 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

chrisdicarlo/eloquent-human-timestamps

最新稳定版本:v6.1.0

Composer 安装命令:

composer require chrisdicarlo/eloquent-human-timestamps

包简介

无描述信息

README 文档

README

This package provides a trait you can add to an Eloquent model that will automatically create human-readable timestamp diffs using Carbon.

Latest Version on Packagist Laravel 11 Tests Total Downloads

Version Compatibility

Laravel PHP Package Version
6 8.0, 7.4, 7.3 2
7 8.0, 7.4, 7.3 2
8 8.1, 8.0, 7.4, 7.3 3
9 8.1, 8.0 4
10 8.1, 8.2, 8.3, 8.4 5
11,12 8.2, 8.3, 8.4 6.x

Installation

To install the package run:

composer require chrisdicarlo/eloquent-human-timestamps 

Setup

Add the ChrisDiCarlo\EloquentHumanTimestamps\HumanTimestamps trait to a model that has timestamp columns, e.g.:

 use ChrisDiCarlo\EloquentHumanTimestamps\HumanTimestamps; class Foobar { use HumanTimestamps; ... } 

Usage

To get the human-readable attribute, simply retrieve the timestamp normally but append _for_humans to the name, e.g. created_at_for_humans, updated_at_for_humans.

统计信息

  • 总下载量: 5.93k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 36
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 36
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固