Here are two ways to check the route name in Laravel.
1// #1 2<a 3 href="{{ route('home') }}" 4 @class="['navbar-link', 'active' => Route::current()->getName() === 'home']" 5> 6 Home 7</a> 8// #2 9<a10 href="{{ route('home') }}"11 @class="['navbar-link', 'active' => request()->routeIs('home)]"12>13 Home14</a>
Tip given by @AndrewSavetchuk