DEV Community

Morcos Gad
Morcos Gad

Posted on

Get Current Route Name Path in Laravel

see the following code to get the current route name in Laravel blade view :-
resources/views/test.blade.php

@php
   $route = Route::current()->getName();
@endphp
{{ $route }} //test
Enter fullscreen mode Exit fullscreen mode

I hope you enjoy the code.

Top comments (0)