Identify Route and URL with Laravel

When you want to Identified and active button in specific page or identify page, you have many ways to do this, but I want to more obviously, so what can we do?

In the past, maybe you do for like this:

<button class="{{ Route::currentRouteName() == '' ? 'active' : '' }}">
<button class="{{ (request()->segment(2) == 'show') ? 'active' : '' }}">

it’s look nice, but can not readable on first sight, we can do for belong and then better.

<button class="{{ request()->is('users/1') ? 'active' : '' }}">

Supported pattern wildcard:

//allow all users belong routes.
<button class="{{ request()->is('users*') ? 'active' : '' }}">

or you can use named, routeIs


Laravel: How to Make Menu Item Active by URL/Route