Home / Snippets / How to Update App URL in Laravel
How to Update App URL in Laravel cover

How to Update App URL in Laravel

3.3K

2 years ago

0 comments

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
notion avatar

Ahabz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

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

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this