mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
13 lines
592 B
Markdown
13 lines
592 B
Markdown
---
|
|
title: 'You can use useCurrent() & useCurrentOnUpdate() on timestamp fields in your migrations'
|
|
tweet_id: '1487081944777035777'
|
|
thread_slug: weekly-thread-2022-04
|
|
author_username: bhaidar
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FJX3Lg1VUAEvcQH.jpg'
|
|
created_at: 2022-01-28T15:15:38+00:00
|
|
slug: you-can-use-usecurrent-usecurrentonupdate-on-timestamp-fields-in-your-migrations
|
|
---
|
|
🌶️ #Laravel tip: When using timestamp() columns in Laravel Migrations, append the useCurrent() & useCurrentOnUpdate() to set timestamp columns' default value to CURRENT_TIMESTAMP
|
|
|
|
#PHP #Developers
|