Today, We want to share with you How to get site URL in Laravel 6?.In this post we will show you laravel 6 get current url without domain, hear for how to get base url in laravel blade file we will give you demo and example for implement.In this post, we will learn about how to get base url in jquery laravel 6 with an example.
How to get site URL in Laravel 6?
There are the Following The simple About How to get Base URL in PHP Laravel 6 Tutorial Full Information With Example and source code.
As I will cover this Post with live Working example to develop laravel get app url from env, so the how to get base url in laravel controller is used for this example is following below.
Laravel 6 Get Site URL Examples
//using URL dd(\URL::to('/')); //using url() methods dd(url('/')); //using asset dd(asset('/')); //using config dd(config('app.url'));
php – Laravel: Get base url
//Example 1 $url = URL::to("/"); print_r($url); //Example 2 $url2 = url('/'); print_r($url2);
I hope you get an idea about redirect to base url laravel.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.