Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // query can't be select * from table where
- Model::select(DB::raw('query'))->get();
- Model::select(DB::raw('query'))
- ->whereNull('deleted_at')
- ->orderBy('id')
- ->get();
- $users = DB::table('users')
- ->select(DB::raw('count(*) as user_count, status'))
- ->where('status', '<>', 1)
- ->groupBy('status')
- ->get();
- $users = DB::select('select * from users where id = ?', array(1));
- $users = DB::select( DB::raw("select * from users where username = :username"), array('username' => Input::get("username")));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement