Answers for "laravel on update current_timestamp"

PHP
2

laravel insert timestamp now

Information::create([
  'data_now'=>CarbonCarbon::now()
])
Posted by: Guest on May-22-2021
0

on update current timestamp laravel migration

$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
$table->timestamp('updated_at')->default(DB::raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));
Posted by: Guest on November-05-2021

Code answers related to "laravel on update current_timestamp"

Browse Popular Code Answers by Language