@@ -116,21 +116,9 @@ This method will return an array of role titles. You may also specify a custom k
116116 $users = DB::table('users')
117117 ->whereNull('updated_at')->get();
118118
119- #### Order By, Group By, And Having
120-
121- $users = DB::table('users')
122- ->orderBy('name', 'desc')
123- ->groupBy('count')
124- ->having('count', '>', 100)
125- ->get();
126-
127- #### Offset & Limit
128-
129- $users = DB::table('users')->skip(10)->take(5)->get();
130-
131119#### Dynamic Where Clauses
132120
133- This feature allows you to write ` where() ` and ` orWhere() ` statements in a more readable and elegant fashion.
121+ You may even use "dynamic" where statements to fluently build where statements using magic methods:
134122
135123 $admin = DB::table('users')->whereId(1)->first();
136124
@@ -139,11 +127,20 @@ This feature allows you to write `where()` and `orWhere()` statements in a more
139127 ->first();
140128
141129 $jane = DB::table('users')
142- ->whereNameOrGender ('Jane', 'F' )
130+ ->whereNameOrAge ('Jane', 22 )
143131 ->first();
144132
145- // Note that snake_case column names are converted into PascalCase
146- $doe = DB::table('users')->whereLastName('doe')->first();
133+ #### Order By, Group By, And Having
134+
135+ $users = DB::table('users')
136+ ->orderBy('name', 'desc')
137+ ->groupBy('count')
138+ ->having('count', '>', 100)
139+ ->get();
140+
141+ #### Offset & Limit
142+
143+ $users = DB::table('users')->skip(10)->take(5)->get();
147144
148145<a name =" joins " ></a >
149146## Joins
0 commit comments