From 215aa2bec4b5bbbfcbf77caea6e3f13b9a377bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 28 Feb 2026 15:13:19 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[approvals]=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EB=93=9C=EB=B0=94=20=EB=B1=83=EC=A7=80=20Blade=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=8A=A4=EC=BD=94=ED=94=84=20?= =?UTF-8?q?=EA=B2=A9=EB=A6=AC=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - View::with() → View::share()로 변경하여 컴포넌트에서 $menuBadges 접근 가능하도록 수정 --- app/Providers/AppServiceProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 5cc53b14..f85e665b 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -79,11 +79,14 @@ public function boot(): void } } + // menuBadges는 Blade 컴포넌트()에서도 접근 필요 + // $view->with()는 컴포넌트 격리 스코프에 전달 안 되므로 View::share 사용 + View::share('menuBadges', $menuBadges); + $view->with([ 'mainMenus' => $menusBySection['main'], 'toolsMenus' => $menusBySection['tools'], 'labsMenus' => $menusBySection['labs'], - 'menuBadges' => $menuBadges, ]); }); }