From 8079b878a19fc931f837a24cf4eec1eadceef363 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 21 May 2026 11:50:04 +0000 Subject: [PATCH] Feat: add dynamic topbar with role-based display - Updated `dashboard-topbar.blade.php` to show "Admin Panel" only for users with the Admin role. - Introduced user initials avatar with logout functionality via dropdown menu. --- .../components/dashbord-topbar.blade.php | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/resources/views/components/dashbord-topbar.blade.php b/resources/views/components/dashbord-topbar.blade.php index 10c522a..80fe909 100644 --- a/resources/views/components/dashbord-topbar.blade.php +++ b/resources/views/components/dashbord-topbar.blade.php @@ -1,12 +1,32 @@ +@php use App\Enums\DefaultUserRole; @endphp
-

Admin Panel

+ @if(auth()->user()?->hasRole(DefaultUserRole::Admin->value)) +

Admin Panel

+ @endif
-
+
- + -
-
+ + + +
+ {{ auth()->user()->initials() }} +
+
+ +
+ @csrf + + +
+