Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Add table prefix support
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Jan 16, 2018
1 parent 8dfc1df commit 10d88e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-binary-uuid` will be documented in this file

## 1.1.2 - 2018-01-16

- add table prefix support

## 1.1.0 - 2017-11-30

- add `getRouteKey` method
Expand Down
8 changes: 6 additions & 2 deletions src/UuidServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ protected function createGrammarFromConnection(Connection $connection): Grammar
}

if ($queryGrammar instanceof IlluminateSQLiteGrammar) {
return new SQLiteGrammar();
$grammar = new SQLiteGrammar();
} else {
$grammar = new MySqlGrammar();
}

return new MySqlGrammar();
$grammar->setTablePrefix($queryGrammar->getTablePrefix());

return $grammar;
}

protected function optimizeUuids()
Expand Down

0 comments on commit 10d88e1

Please sign in to comment.