@php $currentRoute = Route::currentRouteName(); $isActive = false; //make sure the provided route is not empty if (isset($routePath) && !empty($routePath)) { //make sure the route add prefix $backendPrefix = env('BACKEND_ROUTE_PREFIX'); if (!empty($backendPrefix)) { $tartsWithPrefix = Str::startsWith($routePath, $backendPrefix); if (!$tartsWithPrefix) { $routePath = $backendPrefix . '/' . $routePath; } } if (Request::is($routePath)) { $isActive = true; } } @endphp
@if (!empty($icon))
{{--