I'm using Laravel 5.2 (on PHP version 7) and below is the update query I'm running:
$data=DB::table('posts')
->where("id", $post_id)
->update(
array(
'title' => $request['title'],
'body' => $request['body'],
'slug' => str_slug($request['title']),
'updated_at' => DB::raw('CURRENT_TIMESTAMP')
));
The "updated_at" field updated with the current time. But I want to update it with the UTC timestamp. How can I achieve this?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kpzD5N
via IFTTT
Aucun commentaire:
Enregistrer un commentaire