Base URL for Your Laravel 4 Website
By Güngör Budak
- One minute read - 41 wordsTo get base URL of your website to generate links to your content or assets do following:
Set $url
in app/config/app.php
to your base URL:
1'url' => 'http://localhost/example',
Use it everywhere with URL::to()
, for example:
1echo URL::to('assets/css/general.css');
2/* outputs http://localhost/example/assets/css/general.css */