Question: I am working with a **laravel 8** app, I want to get the route name which we write in the ->name() method. Basically want to print this name in title of page.

[->name() method in the laravel 8, Laravel Routes](https://i.stack.imgur.com/fPkbw.png)

`Route::view('/documents_for_approvals','document_approval')->name('Document Approvals'); //SA`

Answer: 
In your View :

```
{{Route::current()->getName()}}

```

If you want to show the current route name in the browser Tab foreach pages
add this to your layout view

```
<title>{{Route::current()->getName()}}</title>

```
Go to project and open a command line and write the line below

```
php artisan route:list --path=documents_for_approvals 

```

Update

[![enter image description here](https://i.stack.imgur.com/oEgCe.png)](https://i.stack.imgur.com/oEgCe.png)