Skip to content

Commit

Permalink
Updating config file with a new feature: ignored-uri
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Mar 22, 2017
1 parent 0ba0fe6 commit 7ab30f6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _docs/2-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions config/localization.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
],
],

/* -----------------------------------------------------------------
| Ignored URI from localization
| -----------------------------------------------------------------
*/

'ignored-uri' => [
//
],

/* -----------------------------------------------------------------
| Locales
| -----------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/Middleware/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ abstract class Middleware extends BaseMiddleware
public function __construct(Localization $localization)
{
$this->localization = $localization;
$this->except = config('localization.ignored-uri', []);
}

/* -----------------------------------------------------------------
Expand Down

0 comments on commit 7ab30f6

Please sign in to comment.