diff --git a/laravel/database/connection.php b/laravel/database/connection.php index a93dd1f6..751be69e 100644 --- a/laravel/database/connection.php +++ b/laravel/database/connection.php @@ -83,6 +83,9 @@ protected function grammar() case 'mysql': return $this->grammar = new Query\Grammars\MySQL($this); + case 'sqlite': + return $this->grammar = new Query\Grammars\SQLite($this); + case 'sqlsrv': return $this->grammar = new Query\Grammars\SQLServer($this); diff --git a/laravel/database/query/grammars/sqlite.php b/laravel/database/query/grammars/sqlite.php new file mode 100644 index 00000000..cacc936e --- /dev/null +++ b/laravel/database/query/grammars/sqlite.php @@ -0,0 +1,24 @@ +orderings as $ordering) + { + $sql[] = $this->wrap($ordering['column']).' COLLATE NOCASE '.strtoupper($ordering['direction']); + } + + return 'ORDER BY '.implode(', ', $sql); + } + +} \ No newline at end of file diff --git a/laravel/uri.php b/laravel/uri.php index ad297acf..2477fe62 100644 --- a/laravel/uri.php +++ b/laravel/uri.php @@ -37,7 +37,7 @@ public static function current() // We'll simply get the path info from the Symfony Request instance and then // format to meet our needs in the router. If the URI is root, we'll give - // back a single slash, otherwise we'll strip the slashes. + // back a single slash, otherwise we'll strip all of the slashes off. $uri = static::format(Request::getPathInfo()); static::segments($uri);