Laravel Get Current URL in Blade Example

Today, We want to share with you Laravel Get Current URL in Blade Example.In this post we will show you wordpress plugin require another plugin, hear for laravel get current url with parameters we will give you demo and example for implement.In this post, we will learn about laravel get current url without domain with an example.

Laravel Get Current URL in Blade Example

There are the Following The simple About laravel get current url with parameters Full Information With Example and source code.

READ :  How to get current URL with parameters in Laravel 6 ?

As I will cover this Post with live Working example to develop how to get current route name in blade file laravel 6, so the How to check current URL inside @if statement in Laravel 6 is used for this example is following below.

use: Request::url()
[php]
@if(Request::url() === ‘your main url here’)
// source code Like menu
@endif
[/php]

get current url in blade view

[php]
How to get current URL in Blade

using the Request facade.
[php]
$current_url = Request::url();
dd($current_url);
[/php]

using @if or @foreach statements
[php]
@if ($prCount > 0)
{{ Request::url() }}
@endif
[/php]

Example 2 : How to check current URL or Route
[php]
@if (Request::url() == ‘your url here’)
// Do source code something
@endif
[/php]

READ :  wordpress INSERT Multiple Rows using $wpdb

[php]
if (\Route::current()->getName() == ‘product’) {
// Godo Luck We are on a correct route!
}
[/php]

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about laravel get url segment.
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.

Leave a Comment