How to Get Site URL In Laravel

In this tutorial you will learn about the How to Get Site URL In Laravel and its application with practical example.

How to Get Site URL In Laravel

In this article, I’ll show you how to get site url in your laravel controller, blade file, model etc. Many times in laravel application development we need to get base url of our laravel application. There follwoing ways we can get site url in our laravel 5 application. In laravel 5 we can get site url or base url using url helper and url facade.

Table Of Contents

Get Site url Using URL Helper

Syntax:-

Example :-

or

Get Site url Using URL Facade

Syntax:-

Example:-

In this tutorial we have learn about the How to Get Site URL In Laravel and its application with practical example. I hope you will like this tutorial.