laravel/laravel — pull request #287 by kbanman (2012-01-29 10:13:22+00:00)
Title: Enable table prefixes (Fixes #286)

Allows specification of a table prefix per connection like so:

```php
'pgsql' => array(
'driver' => 'pgsql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'table_prefix' => 'pre_',
),
```

The prefix is applied at the `Grammar` level (both for Query and Schema), so it applies to all generated SQL. Hand-coded queries can get the prefix by calling `DB::connection()->table_prefix()`.