@php
$sidebarItems = json_decode(file_get_contents(resource_path('views/partials/sidenav.json')), true);
$authUser = auth()->user();
// Nếu user là cổ đông (role_id == 2) chỉ hiển thị menu có label = 'Daily'
if ($authUser && $authUser->role_id == 2) {
$sidebarItems = array_values(
array_filter($sidebarItems, function ($it) {
return isset($it['label']) && $it['label'] === 'Daily';
}),
);
}
@endphp