added support for database table prefixes.

This commit is contained in:
Taylor Otwell
2012-01-29 13:07:15 -06:00
parent 97fcea1e51
commit 1ec6fc766c
6 changed files with 73 additions and 22 deletions

View File

@@ -27,7 +27,11 @@ abstract class Grammar extends \Laravel\Database\Grammar {
// This method is primarily for convenience so we can just pass a
// column or table instance into the wrap method without sending
// in the name each time we need to wrap one of these objects.
if ($value instanceof Table or $value instanceof Fluent)
if ($value instanceof Table)
{
return $this->wrap_table($value->name);
}
elseif ($value instanceof Fluent)
{
$value = $value->name;
}