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() == 'users.show' ? '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

request()->route()->named('admin*')
request()->routeIs('users*')
request()->routeIs('users/yish/events*')
request()->fullUrlIs(...)

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