Commit 7898094e authored by Taylor Otwell's avatar Taylor Otwell

clean up a few more things.

parent cb5a426c
...@@ -108,7 +108,7 @@ return array( ...@@ -108,7 +108,7 @@ return array(
($request->spoofed()) ? $input = $_POST : parse_str(file_get_contents('php://input'), $input); ($request->spoofed()) ? $input = $_POST : parse_str(file_get_contents('php://input'), $input);
} }
unset($input['_REQUEST_METHOD_']); unset($input['_REQUEST_METHOD']);
return new Input($container->resolve('laravel.file'), $container->resolve('laravel.cookie'), $input, $_FILES); return new Input($container->resolve('laravel.file'), $container->resolve('laravel.cookie'), $input, $_FILES);
}), }),
......
...@@ -13,7 +13,14 @@ class Connection { ...@@ -13,7 +13,14 @@ class Connection {
protected $config; protected $config;
/** /**
* The PDO connection. * The query grammar instance for the connection.
*
* @var Grammars\Grammar
*/
protected $grammar;
/**
* The raw PDO connection instance.
* *
* @var PDO * @var PDO
*/ */
...@@ -127,13 +134,15 @@ class Connection { ...@@ -127,13 +134,15 @@ class Connection {
*/ */
protected function grammar() protected function grammar()
{ {
if (isset($this->grammar)) return $this->grammar;
switch (isset($this->config['grammar']) ? $this->config['grammar'] : $this->driver()) switch (isset($this->config['grammar']) ? $this->config['grammar'] : $this->driver())
{ {
case 'mysql': case 'mysql':
return new Grammars\MySQL; return $this->grammar = new Grammars\MySQL;
default: default:
return new Grammars\Grammar; return $this->grammar = new Grammars\Grammar;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment