Posts Learn Components Snippets Categories Tags Tools About
/

How to Update App URL in Laravel

Get to know how to update the URL from the config to have a pretty url when generating images, assets path and etc.

Created on Aug 06, 2021

3238 views

To change the App URL of a Laravel application, you can specify it from the .env (environment) file. By having the APP_URL updated instead of using the "http://localhost" you will have a pretty URL when generating images, assets path and etc.

APP_NAME="Example App"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=https://example.test

Once you have done that do make sure to clear your config cache or restart your local webserver for the changes to get reflected.
php artisan cache:clear

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

Load comments for How to Update App URL in Laravel

)