0

guys. I'm working on laravel 8 + Vue 3. I real server .vue files (console.log(process.env.MIX_APP_URL) - for instance) shows wrong values from .env.

I checked my .env file in server: MIX_APP_URL=https://laravel.process.kz. But in .vue files it gives me "http://localhost:8888/laravelprocess".

I tried php artisan config:cache, php artisan config:clear, php artisan cache:clear, php artisan key:generate etc. Please, help to find out whats the problem.

1 Answer 1

1

If you change the env file you might need to restart serve if its still running.

It might also load additional .env files for instance:

.env                # loaded in all cases
.env.local          # loaded in all cases, ignored by git
.env.[mode]         # only loaded in specified mode
.env.[mode].local   # only loaded in specified mode, ignored by git
Sign up to request clarification or add additional context in comments.

2 Comments

did not help(( I tried, not working
Ah i misunderstood your situations, on the production server your env has the local value. Try creating a .env.production in the project locally, when building the app it uses the .env files, not on the server in production.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.