Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

insert timestamps manually in laravel

// if you would set local timezon otherwise skip this
$timezone = "Asia/Dhaka";
date_default_timezone_set($timezone);
// insert created_at value manually
DB::table('table')->insert([
	'key'=> 'value',
  	'created_at' => date("Y-m-d H:i:s", strtotime('now'))
]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #insert #timestamps #manually #laravel
ADD COMMENT
Topic
Name
8+5 =