(role=1 or role=3) AND status=1; DB::table(‘users’)->where(function ($query){ $query->where(‘role’, ‘=’, 1)->orWhere(‘role’, ‘=’, 3); })->where(‘status’, ‘=’, 1)->get(); // SELECT name, email FROM users; DB::table(‘users’)->select(’name’,’email’)->get(); DB::table(‘users’)->select(DB::raw(“name, email”))->get(); // INSERT INTO users (email, name) VALUES ('
[email protected]','John'), ('
[email protected]','Gary') DB::table(‘users’)->insert(array( array(‘email’=>’
[email protected]’, ‘name‘=>’John’) array(‘email’=>’
[email protected]’, ‘name‘=>’Gary’) )); // UPDATE users SET name=’Lary’ WHERE id=1 DB::table(‘users’)->where(‘id’, ‘=’, 1)->update(array(‘name’=>’Lary’)); DB::table(‘users’)->where(‘id’, ‘=’, 1)->increment(‘visits’, 1); DB::table(‘users’)->where(‘id’, ‘=’, 1)->decrement(‘visits’, 1);