| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php namespace jlourenco\support\Database; |
||
| 37 | protected static function useCustomGrammar($connection) |
||
| 38 | {
|
||
| 39 | // Only for MySqlGrammar |
||
| 40 | if (get_class($connection) === 'Illuminate\Database\MySqlConnection') {
|
||
| 41 | $MySqlGrammar = $connection->withTablePrefix(new MySqlGrammar); |
||
| 42 | $connection->setSchemaGrammar($MySqlGrammar); |
||
| 43 | } |
||
| 44 | |||
| 45 | $schema = $connection->getSchemaBuilder(); |
||
| 46 | $schema->blueprintResolver(function($table, $callback) {
|
||
| 47 | return new Blueprint($table, $callback); |
||
| 48 | }); |
||
| 49 | |||
| 50 | return $schema; |
||
| 51 | } |
||
| 52 | |||
| 53 | } |