title: Laravel - why not relative URL's?
body: <p>I have been learning Laravel recently and I have seemingly missed a key point: why should <em>relative</em> links be avoided?</p>
  
  <p>For example, I have been suggested to use <code>URL::to()</code> which outputs the full path of the page passed as a parameter - but why do this when you could just insert a relative link anyway? E.g., putting <code>URL::to('my/page')</code> into a <code>&lt;href&gt;</code> will just insert <code>http://www.mywebsite.com/my/page</code> into the <code>&lt;href&gt;</code>; but on my website <code>href='my/page'</code> works exactly the same. On my website I have based all relative URL's from the <code>index.php</code> file found in the public directory.</p>
  
  <p>Clearly, I'm missing a key point as to why full paths are used.</p>