Created
January 17, 2018 14:17
-
-
Save tadeubdev/34aa8a87f4d56e9e1480846f3e20f41d to your computer and use it in GitHub Desktop.
Laravel 5 force root url
This file contains hidden or 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
| // Add it to file: app/Providers/RouteServiceProvider.php | |
| /** | |
| * @inheritdoc | |
| */ | |
| public function boot() | |
| { | |
| parent::boot(); | |
| /** @var \Illuminate\Routing\UrlGenerator $url */ | |
| $url = $this->app['url']; | |
| // Force the application URL | |
| $url->forceRootUrl(config('app.url')); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment