my development environment is :
- Back: Laravel app installed on Laravel Homestead
- Front: VueCLI application started with 'npm run serve' and ran on http://localhost:8080 during development.
I need the Laravel API to copy an image hosted in my front application, and available in the browser via http://localhost:8080/img/myimage.png
But any PHP/Laravel function to copy or get file contents return an error :
file_get_contents(http://localhost:8080/img/myimage.png): failed to open stream: Connection refused
This only happens when running the app with 'npm run serve'. When building the app for production and running it on a "standard" domain (ex: http://myapp.test), it works.
How can I give PHP/Laravel access to files on http://localhost:8080 ?
thanks