update with where clause in laravel controller code example
Example: laravel update from query
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);