<?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
•120 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 Snippets
Build Nested Collpsing Component in Alpine Js Using Collapse Plugin
1 year ago
![How to Fix Laravel PDOException SQLSTATE[HY000] [2002] No such file or directory cover](https://cdn.postsrc.com/images/snippets/how-to-fix-laravel-pdoexception-sqlsstate-error.jpeg)
How to Fix Laravel PDOException SQLSTATE[HY000] [2002] No such file or directory
1 year ago

Laravel Cursor Vs Laravel Chunk Code Example
1 year ago

How to Define Computed Properties in Laravel Livewire
1 year ago

Laravel Where In Condition
1 year ago

How to clear Route cache in Laravel 8
1 year ago