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
a1769cfb
Commit
a1769cfb
authored
Dec 20, 2015
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some blueprint inconsistencies
parent
84e78f79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
Blueprint.php
src/Jenssegers/Mongodb/Schema/Blueprint.php
+11
-4
No files found.
src/Jenssegers/Mongodb/Schema/Blueprint.php
View file @
a1769cfb
...
...
@@ -114,13 +114,16 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint {
* Specify a unique index for the collection.
*
* @param string|array $columns
* @param array $options
* @return Blueprint
*/
public
function
unique
(
$columns
=
null
,
$
name
=
null
)
public
function
unique
(
$columns
=
null
,
$
options
=
[]
)
{
$columns
=
$this
->
fluent
(
$columns
);
$this
->
index
(
$columns
,
[
'unique'
=>
true
]);
$options
[
'unique'
]
=
true
;
$this
->
index
(
$columns
,
$options
);
return
$this
;
}
...
...
@@ -144,12 +147,16 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint {
* Specify a sparse index for the collection.
*
* @param string|array $columns
* @param array $options
* @return Blueprint
*/
public
function
sparse
(
$columns
=
null
)
public
function
sparse
(
$columns
=
null
,
$options
=
[]
)
{
$columns
=
$this
->
fluent
(
$columns
);
$this
->
index
(
$columns
,
[
'sparse'
=>
true
]);
$options
[
'sparse'
]
=
true
;
$this
->
index
(
$columns
,
$options
);
return
$this
;
}
...
...
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