Interesting effectively ... what do you propose if there are various situations :
-
desktop menu : the label and an icon (label on the right of the icon or perhaps also label under the icon)
-
mobile menu : only an icon
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone! Hi all.
I just released a small Laravel package that makes it easy to add human-readable labels to your routes and use them in Blade views. It also provides a convenient @routeLink Blade directive for generating links.
Often, when building navigation menus or breadcrumbs, you want a human-readable label for a route without repeating strings or relying only on translation files. This package keeps your route names and labels in one place and makes generating links clean and readable.
Route::get('/', function () {
return view('welcome');
})->name('home')->label('Home');
Retrieve the label anywhere in your app: {{ routeLabel('home') }} {{-- returns 'Home' --}}
Blade directive for quick links: @routeLink('home') {{-- compiles to <a href="...">Home</a> --}}
Fallback: if no label is defined, routeLabel() returns the route name.
Any feedback is welcome.
Link: https://packagist.org/packages/milenmk/laravel-route-label
Please or to participate in this conversation.