When it comes to deployment of web app like Laravel into different machines or operating system.
Docker containerization is your best bet.
With Docker, you can create docker-compose or just an docker image of your web app and other dependencies.
These containers will then be able to run to any machine that has Docker in it.
To give you an example these are my usual setup with a single Docker Compose project
- My Web app runs in Production server (CentOS 7)
- Same web app runs on my local windows machine (Windows 10)
- Same web app runs on my Mac machine (Mac OS Big Sur)
No installations and configurations were needed, no Php's, Composer, Supervisor, and other related dependencies to run or install especially on local machines.
You just need patience and time to learn how these things work.
Here is a good intro for Docker containers.
https://www.docker.com/resources/what-container