Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
7e14145d
Commit
7e14145d
authored
May 01, 2013
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Readme
parent
43230579
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
README.md
README.md
+10
-2
No files found.
README.md
View file @
7e14145d
...
@@ -74,12 +74,20 @@ Examples
...
@@ -74,12 +74,20 @@ Examples
**Using Where In With An Array**
**Using Where In With An Array**
$users = User::whereIn('id', array(1, 2, 3))->get();
$users = User::whereIn('age', array(16, 18, 20))->get();
**Where null**
$users = User::whereNull('updated_at')->get();
**Order By**
**Order By**
$users = User::orderBy('name', 'desc')->get();
$users = User::orderBy('name', 'desc')->get();
**Offset & Limit**
$users = User::skip(10)->take(5)->get();
**Advanced Wheres**
**Advanced Wheres**
$users = User::where('name', '=', 'John')->orWhere(function($query)
$users = User::where('name', '=', 'John')->orWhere(function($query)
...
@@ -97,11 +105,11 @@ Selected columns that are not grouped will be aggregated with the $last function
...
@@ -97,11 +105,11 @@ Selected columns that are not grouped will be aggregated with the $last function
**Aggregation**
**Aggregation**
$total = Order::count();
$price = Order::max('price');
$price = Order::max('price');
$price = Order::min('price');
$price = Order::min('price');
$price = Order::avg('price');
$price = Order::avg('price');
$total = User::sum('votes');
$total = User::sum('votes');
$total = Order::count();
**Like**
**Like**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment