update query in laravel eloquent
snippet in php

laravel delete where

user3380

DB::table('users')->where('id', $id)->delete();

eloquent update row response

user6131

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

laravel update from query

user6361

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

update query in laravel eloquent

user6466

$data = DB::table('cart')
                ->where('crt_id', $id)
               ->update(['crt_status' =>'0']);