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
ad9dc568
Commit
ad9dc568
authored
Jan 06, 2014
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #104
parent
76781d79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
Blueprint.php
src/Jenssegers/Mongodb/Schema/Blueprint.php
+10
-10
SchemaTest.php
tests/SchemaTest.php
+9
-0
No files found.
src/Jenssegers/Mongodb/Schema/Blueprint.php
View file @
ad9dc568
...
...
@@ -178,16 +178,6 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint {
$this
->
collection
->
drop
();
}
/**
* Allow an attribute to be null, does not do anything.
*
* @return Blueprint
*/
public
function
nullable
()
{
return
$this
;
}
/**
* Add a new column to the blueprint.
*
...
...
@@ -224,4 +214,14 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint {
}
}
/**
* Allows the use of unsupported schema methods.
*
* @return Blueprint
*/
public
function
__call
(
$method
,
$args
)
{
return
$this
;
}
}
tests/SchemaTest.php
View file @
ad9dc568
...
...
@@ -141,6 +141,15 @@ class SchemaTest extends PHPUnit_Framework_TestCase {
$this
->
assertEquals
(
1
,
$index
[
'key'
][
'token'
]);
}
public
function
testDummies
()
{
Schema
::
collection
(
'newcollection'
,
function
(
$collection
)
{
$collection
->
boolean
(
'activated'
)
->
default
(
0
);
$collection
->
integer
(
'user_id'
)
->
unsigned
();
});
}
protected
function
getIndex
(
$collection
,
$name
)
{
$collection
=
DB
::
getCollection
(
$collection
);
...
...
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