I remember that when I used the Codeigniter framework, I could figure out which was the base url of the application, simply calling base_url()
. In Laravelle 3, I used URL::base()
.
But now, in Laravel 5, when I call URL::base()
, it returns the following error:
BadMethodCallException with message 'Base method does not exist.'
I tested it in Laravel 4, and the same error occurred.
So, what is the correct way to find the base url of the application, using Laravel 4 or 5?