diff --git a/app/Http/Controllers/Admin/Dashboard/OverviewController.php b/app/Http/Controllers/Admin/Dashboard/OverviewController.php index 16e52c5..afcadad 100644 --- a/app/Http/Controllers/Admin/Dashboard/OverviewController.php +++ b/app/Http/Controllers/Admin/Dashboard/OverviewController.php @@ -74,6 +74,9 @@ public function index() DB::raw('COUNT(*) as transaction_count') ) ->orderBy('total_transaction', 'desc') + ->when(auth()->user()->role_id === 5, function ($query) { + return $query->where('user_id', auth()->id()); + }) ->limit(5) ->get();