<?php Schema::create('posts', function (Blueprint $table) { $table->timestamp('published_at')->useCurrent(); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->useCurrent(); });
Set Default Timestamp in Laravel Migration
Learn how to set the default timestamp in Laravel migration to auto assign the current timestamp
Created on Aug 02, 2021
•168 views
If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️
Load comments for Set Default Timestamp in Laravel Migration
PostSrc Code Components
Collection of Tailwind CSS components for everyone to use. Browse all of the components that are right for your project.
View ComponentsSponsors 👑
+ Add YoursOther Code Snippets
All SnippetsUpdating a resource with the Fetch API from front-end application
2 years ago
How to Customize and Display Laravel Pagination Links
2 years ago
How to Write PHP Code inside of Laravel Blade Template
2 years ago
How to Retrieve Certificate and Private Key from Laravel Forge Server
1 year ago
How to Query Column That is Not Null In Laravel
2 years ago
How to Flush your DNS Cache on macOS Big Sur
2 years ago