0

I need to print current URL. I am using below code

<a href="{! $request->url() !}">URL</a>

But it is not working.

abu abu
  • 6,599
  • 19
  • 74
  • 131
  • You can use either `Request::url()` or `Request::fullUrl()` methods to get the current URL. – nyedidikeke Oct 05 '19 at 04:13
  • Possible duplicate of [How to Get the Current URL Inside @if Statement (Blade) in Laravel 4?](https://stackoverflow.com/questions/17591181/how-to-get-the-current-url-inside-if-statement-blade-in-laravel-4) – nyedidikeke Oct 05 '19 at 04:21

1 Answers1

1

This is how I do it.

{{url()->current()}}
daugaard47
  • 1,726
  • 5
  • 39
  • 74