Updated_at Timestamp with Laravel 4.2 DB Class

Solution:

use the Carbon class included with Laravel 4.2

At the top of the file, put this:

use Carbon\Carbon;

Here’s the query

$post = DB::update('UPDATE posts SET title=?,message=?,author=?,updated_at=? WHERE id=?',
    array(
        Input::get('title'),
        Input::get('message'),
        Input::get('author'),
        \Carbon\Carbon::now(),
        $id
    )
);