Laravel Migrations Date time field

Alton Mikel

Iam trying to create a laravel date time field,how can i do it guys. I have tried $table->dateTime('time')->default(new \DateTime()); but it is not working out for me.

Kaddu Livingstone

Just use $table->timestamp('time')->useCurrent = true; if u don't want to auto fill current use $table->timestamp('expires_at')

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related