当前位置:网站首页>Laravel $object->updated_ At returns the carbon object. How to return the normal time format
Laravel $object->updated_ At returns the carbon object. How to return the normal time format
2022-07-28 12:15:00 【History teacher-】
1. When you are ready to use created_at When the date of , Have you found $object->created_at Return is indeed an object , instead of string
Use the following methods to get the time you want
$object->created_at->timestamp // Return timestamp
$object->updated_at->format('Y-m-d H:i:s') // return ‘2020-07-20 17:00:13’
$object->created_at It's actually php Built in time object DateTime An example of .
Link to the original text :https://blog.csdn.net/JineD/article/details/107473329
边栏推荐
- Launcher sample code
- [leetcode] 7. valid anagram · effective letter ectopic words
- 2022.07.12 summer training personal qualifying (VII)
- Final modifier attribute
- How async await implements concurrency
- [real question of written examination]
- [diary of supplementary questions] [2022 Niuke summer school 2] h-take the elevator
- Globalthis is not defined solution
- SQL注入 Less18(头部注入+报错注入)
- P5472 [NOI2019] 斗主地(期望、数学)
猜你喜欢

IRBuilder

Use Baidu PaddlePaddle easydl to complete garbage classification

STL concept and its application

Upgrading of computing power under the coordination of software and hardware, redefining productivity

Alexnet - paper analysis and reproduction

15、用户web层服务(三)

Globalthis is not defined solution

Unity one key replacement of objects in the scene
![[leetcode] 8. binary search · binary search](/img/35/c4ff66c124754c2a9a7d63b8040e4a.png)
[leetcode] 8. binary search · binary search

Live: never believe that suffering is worth it. Suffering is suffering
随机推荐
ES6 knowledge points supplement
[geek challenge 2019] babysql-1 | SQL injection
[diary of supplementary questions] [2022 Niuke summer multi school 2] D-Link with game glitch
14、用户web层服务(二)
一些知识概念
Hcip rip comprehensive experiment
【Try to Hack】内网基础
“蔚来杯“2022牛客暑期多校训练营2
本地化、低时延、绿色低碳:阿里云正式启用福州数据中心
China business CDP white paper | love Analysis Report
Test platform (V) knowledge points supplement
Rest style
ViewPager2+Fragment
Great! Jd.com developed the highly available website construction technology PDF recommended by the first brother. Prepare the water and chew it slowly
Multithreading and high concurrency (III) -- source code analysis AQS principle
顶级“Redis笔记”,缓存雪崩+击穿+穿透+集群+分布式锁,NB了
Training mode and practice of digital applied talents in Colleges and Universities under the integration of industry and education
Full analysis of seven classical regression analysis methods
要想组建敏捷团队,这些方法不可少
Hcip (condition matching and OSPF packet related knowledge)