Docker compose extra hosts

Hi, i have setup a multiple project with Laradock. One of the projects is the website and the other is an api built in laravel. When i try to do file_get_contents from them website i get “connection refused” but i can with success access the address in my browser… i have read something about “extra_hosts” in docker-compose yml file… does any know how i enable one site to get info from the other?

Thanks
/Daniel