Skip to content

Commit 27c89d9

Browse files
authored
Merge pull request #46 from emrullahardc/1.9
Update UrlGenerator.php
2 parents b527213 + a797512 commit 27c89d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Routing/UrlGenerator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ public function __construct(RouteCollection $routes, Request $request)
3535
parent::__construct(app('router')->getRoutes(), $request);
3636

3737
$this->parser = app(Engine::class);
38+
$forcedRoot = env('APP_URL',$request->root());
3839

3940
if (defined('LOCALE')) {
40-
$this->forceRootUrl($request->root() . '/' . LOCALE);
41+
$forcedRoot.='/'.LOCALE;
4142
}
43+
44+
$this->forceRootUrl($forcedRoot);
4245
}
4346

4447
/**

0 commit comments

Comments
 (0)