Why is the php version of Laradock different from the php version executed by the actual Laravel framework

99 Views Asked by At

Why is the php version in the laravel project not the same as the php version in the docker-compose workspace?

My laradock .env has set PHP_VERSION=8.1 and build. Looks useful in workspace.

enter image description here

But when executing "echo phpversion()" in the actual Laravel project, the php version is 7.2.34? Please tell me how to make the Laravel project execute php 8.1. Thanks a lot!!!!

enter image description here

(/laradock/nginx/sites/another.conf) enter image description here

0

There are 0 best solutions below