Get base URL in Laravel 5

Get base URL in Laravel 5

Get base URL in Laravel 5

Base url is the site url or home url of your web applications. Like other frameworks laravel have its own base url function which we can use in our web applications.

Blade Template Method

To get the base url in blade templates use following code

Simple PHP Method

If you are not using the Blade templating engine, you can simply echo to output the URL.

Sandeep Kumar

Sandeep kumar is a web developer and a professinal blogger. He works for latest technologies and write articles what he learn. In ICodeHub he share web languages tutorials and other programming tips and tricks. if you need some help or have some suggestion then mail him at sandeep92pal@gmail.com without any hesitation. He believes in learning and sharing.