I use a Mac at home and Windows at work.
I am working on Laravel project at home and pushed it to GitLab. I haven't adjusted any of the
laravel new [use the same name for the project]
So to make it work,
Do these steps.
composer updateon both systems.
.envfiles as per your database username and password defined.
Don't modify anything apart from
.env file to make it work on both the systems.
Feel free to comment if you face any kind of error. I've been using more than 2 places to code and continue development so yeah, this is the way.
Hope this helps. :)