created_at default value laravel
snippet in php

created_at default value laravel

user9745

$table->timestamp('created_at')->useCurrent();

mysql timestamp in laravel migration

user2141

$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));