Aset Hamid
Aset Hamid

Reputation: 3

Laravel vuejs. In vue files data from .env file shows wrong value

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.

Upvotes: 0

Views: 186

Answers (1)

John Zwarthoed
John Zwarthoed

Reputation: 1277

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

Upvotes: 1

Related Questions