I'm ready to scream how hard can this be? I've been trying for too long. If I have http://www.example.com/more/pages/page.php or similar I want to be able to get www.example.com.
Thats all. So I can use it as I please. This will of course change if on production or development so I want to ascertain it dynamically.
Request::root()
returns http://www.example.com/more/pages/page.php
URL::to('/')
returns http://www.example.com/more/pages/page.php
How do I get this? Why am I having so much trouble to do this??
Request::getHttpHost()
, from your question seems that it's what you need. – Jarek Tkaczyk Jul 28 '14 at 13:49Request::getHost()
also works. – lowerends Jul 28 '14 at 14:03