diff --git a/_docs/2-Configuration.md b/_docs/2-Configuration.md index 3f1d324..36bab28 100644 --- a/_docs/2-Configuration.md +++ b/_docs/2-Configuration.md @@ -63,6 +63,16 @@ return [ | localized-routes | Allows to register all translatable routes. | | translation-redirect | Allows to translate the route attributes by using the translation event. | +## Ignored URI + +```php + 'ignored-uri' => [ + // + ], +``` + +You can set a list of uris to ignore from localization checks. + ## Locales ```php diff --git a/config/localization.php b/config/localization.php index d11fea3..428f613 100644 --- a/config/localization.php +++ b/config/localization.php @@ -30,6 +30,15 @@ ], ], + /* ----------------------------------------------------------------- + | Ignored URI from localization + | ----------------------------------------------------------------- + */ + + 'ignored-uri' => [ + // + ], + /* ----------------------------------------------------------------- | Locales | ----------------------------------------------------------------- diff --git a/src/Middleware/Middleware.php b/src/Middleware/Middleware.php index d535317..370725b 100644 --- a/src/Middleware/Middleware.php +++ b/src/Middleware/Middleware.php @@ -44,6 +44,7 @@ abstract class Middleware extends BaseMiddleware public function __construct(Localization $localization) { $this->localization = $localization; + $this->except = config('localization.ignored-uri', []); } /* -----------------------------------------------------------------