Skip to content

Commit

Permalink
fixed #173
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Cámara committed Feb 12, 2015
1 parent 5af9bc3 commit f98484e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["localization", "laravel", "php"],
"homepage": "https://github.com/mcamara/laravel-localization",
"license": "MIT",
"version": "1.0.4",
"version": "1.0.5",
"authors": [
{
"name": "Marc Cámara",
Expand Down
10 changes: 4 additions & 6 deletions src/Mcamara/LaravelLocalization/LaravelLocalization.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use Illuminate\Http\Request;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\URL;
use Session;
use Cookie;


class LaravelLocalization {
Expand Down Expand Up @@ -524,9 +522,9 @@ public function getSupportedLanguagesKeys()
*/
protected function getSessionLocale()
{
if ( $this->useSessionLocale() && Session::has($this->cookieSessionName) )
if ( $this->useSessionLocale() && app('session')->has($this->cookieSessionName) )
{
return Session::get($this->cookieSessionName);
return session($this->cookieSessionName);
}

return false;
Expand All @@ -540,7 +538,7 @@ protected function storeSession( $locale )
{
if ( $this->useSessionLocale() )
{
Session::put($this->cookieSessionName, $locale);
session($this->cookieSessionName, $locale);
}
}

Expand Down Expand Up @@ -804,7 +802,7 @@ public function createUrlFromUri( $uri )
{
if ( empty( $this->baseUrl ) )
{
return URL::to($uri);
return app('url')->to($uri);
}

return $this->baseUrl . ltrim($uri, "/");
Expand Down

0 comments on commit f98484e

Please sign in to comment.