Skip to content

Commit fecc60c

Browse files
committed
Add grammar class for #999
1 parent 81ae5a6 commit fecc60c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/Jenssegers/Mongodb/Connection.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function __construct(array $config)
4040
$this->db = $this->connection->selectDatabase($config['database']);
4141

4242
$this->useDefaultPostProcessor();
43+
44+
$this->useDefaultSchemaGrammar();
4345
}
4446

4547
/**
@@ -207,6 +209,16 @@ public function getDriverName()
207209
return 'mongodb';
208210
}
209211

212+
/**
213+
* Get the default schema grammar instance.
214+
*
215+
* @return Schema\Grammar
216+
*/
217+
protected function getDefaultSchemaGrammar()
218+
{
219+
return new Schema\Grammar;
220+
}
221+
210222
/**
211223
* Dynamically pass methods to the connection.
212224
*
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php namespace Jenssegers\Mongodb\Schema;
2+
3+
use Illuminate\Database\Schema\Grammars\Grammar as BaseGrammar;
4+
5+
class Grammar extends BaseGrammar
6+
{
7+
}

0 commit comments

Comments
 (0)