Answers for "created_at datetime default current_timestamp laravel"

PHP
3

laravel current timestamp

use Carbon\Carbon;
$current_date_time = Carbon::now()->toDateTimeString(); // Produces something like "2019-03-11 12:25:00"
Posted by: Guest on March-03-2021
2

laravel date default now

$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
Posted by: Guest on February-26-2021

Code answers related to "created_at datetime default current_timestamp laravel"

Browse Popular Code Answers by Language