-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from ARCANEDEV/laravel-5.5
Updating the package for Laravel 5.5
- Loading branch information
Showing
12 changed files
with
49 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,16 @@ | |
use Arcanedev\Localization\Contracts\Localization; | ||
use Arcanedev\Localization\Entities\LocaleCollection; | ||
use Arcanedev\Localization\Exceptions\UndefinedSupportedLocalesException; | ||
use Arcanedev\Support\Bases\Middleware as BaseMiddleware; | ||
use Illuminate\Http\RedirectResponse; | ||
use Illuminate\Http\Request; | ||
|
||
/** | ||
* Class Middleware | ||
* | ||
* @package Arcanedev\Localization\Bases | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
abstract class Middleware extends BaseMiddleware | ||
abstract class Middleware | ||
{ | ||
/* ----------------------------------------------------------------- | ||
| Properties | ||
|
@@ -119,7 +119,7 @@ protected function isDefaultLocaleHidden($locale) | |
* | ||
* @return bool | ||
*/ | ||
protected function shouldIgnore($request) | ||
protected function shouldIgnore(Request $request) | ||
{ | ||
foreach ($this->except as $except) { | ||
if ($except !== '/') | ||
|
@@ -146,11 +146,9 @@ protected function shouldIgnore($request) | |
*/ | ||
protected function getLocalizedRedirect($locale) | ||
{ | ||
$localizedUrl = $this->localization->getLocalizedURL($locale); | ||
|
||
if ( ! is_string($localizedUrl)) return null; | ||
|
||
return $this->makeRedirectResponse($localizedUrl); | ||
return is_string($localizedUrl = $this->localization->getLocalizedURL($locale)) | ||
? $this->makeRedirectResponse($localizedUrl) | ||
: null; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters