laravel update from query
snippet in php

laravel update from query

user5816

$affected = DB::table('users')
              ->where('id', 1)
              ->update(['votes' => 1]);