laravel
haleyrom
大千世界,良莠不齐。勿忘初衷,不动如峰!
展开
-
Laravel 自带时间处理函数 - Carbon 的 diffForHumans 方法
Carbon 是继承自 PHP DateTime 类 的子类,但比后者提供了更加丰富、更加语义化的 API。其中一个比较实用的 API 就是 diffForHumans 方法,几乎每个用 Laravel 构建的项目中都有用到它。 比如,一个博客系统里的文章发布时间,显示格式可能就像下面这样: **距离现在时间** **显示格式** < 1小时 ...原创 2018-05-03 08:28:01 · 3035 阅读 · 0 评论 -
Laravel new 项目缺少Vendor(composer忽略php7版本)
错误 Your requirements could not be resolved to an installable set of packages. 原因 php不匹配composer.json要求的版本 解决方法 composer install –ignore-platform-reqs composer update –ignore-platf...原创 2018-04-28 16:23:39 · 3613 阅读 · 0 评论