1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/you-can-use-usecurrent-usecurrentonupdate-on-timestamp-fields-in-your-migrations.md
2022-01-28 17:36:41 +01:00

592 B

title tweet_id thread_slug author_username images created_at slug
You can use useCurrent() & useCurrentOnUpdate() on timestamp fields in your migrations 1487081944777035777 weekly-thread-2022-04 bhaidar
https://pbs.twimg.com/media/FJX3Lg1VUAEvcQH.jpg
2022-01-28T15:15:38+00:00 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