@php $admin = auth('admin')->user(); $name = $admin?->name ?? ''; $email = $admin?->email ?? ''; $initials = collect(preg_split('/\s+/', trim($name))) ->filter() ->take(2) ->map(fn ($p) => mb_strtoupper(mb_substr($p, 0, 1))) ->implode('') ?: 'NA'; $currentLocale = app()->getLocale(); // The Edit-Mode toggle only renders on the two show pages where // inline editing actually lives — adding it globally would confuse // the navbar everywhere else (logs, dashboard, etc. have no // editable sections). $currentRoute = optional(request()->route())->getName(); $showEditModeToggle = in_array($currentRoute, ['admin.investors.show', 'admin.startups.show'], true); @endphp