Skip to content

Commit

Permalink
Use Env::get instead of env (#745)
Browse files Browse the repository at this point in the history
It conflicts with other `env()` global functions (such as CakePHP), and most of them don't handle closures.
  • Loading branch information
oytuntez authored Sep 12, 2020
1 parent ec5188e commit fdb68d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mcamara/LaravelLocalization/LaravelLocalization.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Config\Repository;
use Illuminate\Contracts\Routing\UrlRoutable;
use Illuminate\Support\Str;
use Illuminate\Support\Env;
use Mcamara\LaravelLocalization\Exceptions\SupportedLocalesNotDefined;
use Mcamara\LaravelLocalization\Exceptions\UnsupportedLocaleException;

Expand Down Expand Up @@ -1036,7 +1037,7 @@ protected function normalizeAttributes($attributes)
*/
protected function getForcedLocale()
{
return env(static::ENV_ROUTE_KEY, function () {
return Env::get(static::ENV_ROUTE_KEY, function () {
$value = getenv(static::ENV_ROUTE_KEY);

if ($value !== false) {
Expand Down

0 comments on commit fdb68d2

Please sign in to comment.