update in laravel query builder code example
Example 1: laravel update from query
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);
Example 2: laravel not in query
DB::table(..)->select(..)->whereNotIn('book_price', [100,200])->get();
Example 3: DB::table('users')->get();
$users = DB::table('users')->get();
Example 4: DB::table('users')->get();
DB::select('SELECT * FROM users WHERE name = ?', array(Input::get('name')));