@props(['events']) @php use Illuminate\Support\Facades\Route; $activeSlug = 'todos'; // Por defecto, 'todos' está activo // Verificar si la ruta actual es 'highlights' if (Route::is('highlights')) { // Obtener el slug de la ruta actual $activeSlug = Route::current()->parameter('slug'); } @endphp
Todos @php $currentPath = request()->path(); $segments = explode('/', $currentPath); $slug = end($segments); $ubicacion = empty($slug) ? env('APP_PAIS') : $slug; @endphp {{-- @dd($ubicacion) --}} @foreach ($events['categories'] as $festividad) {{ $festividad['name'] }} @endforeach