@php $navItems = [ ['label' => 'Dashboard', 'route' => 'dashboard'], ['label' => 'Contacts', 'route' => 'contacts.index'], ['label' => 'New contact', 'route' => 'contacts.create'], ['label' => 'Import CSV', 'route' => 'imports.form'], ['label' => 'Messages', 'route' => 'sms.index'], ['label' => 'Calls', 'route' => 'calls.index'], ['label' => 'Email', 'route' => 'emails.index'], ['label' => 'Compose email', 'route' => 'emails.create'], ['label' => 'Settings', 'route' => 'settings.general'], ['label' => 'API tokens','route' => 'api-tokens.index'], ]; $nav = collect($navItems)->filter(fn ($i) => \Illuminate\Support\Facades\Route::has($i['route']))->values(); @endphp