select function in eloquent in larael 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]);