Update Query in Laravel 5

0

The query builder can also update existing records using the update method. The update method, like the insert method, accepts an array of column and value pairs containing the columns to be updated.

$query_update =  DB::table('cart_products')
   ->where('user_id', $id)
   ->update(['status' => '1']);