diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php index 8269d4d..3747bee 100644 --- a/app/Http/Controllers/NotificationController.php +++ b/app/Http/Controllers/NotificationController.php @@ -62,6 +62,6 @@ class NotificationController extends Controller { $response = $this->notification->getNotify(); - return ResponseJson::data($response); + return response()->json($response); } } diff --git a/app/Repositories/Notifications/NotificationRepository.php b/app/Repositories/Notifications/NotificationRepository.php index baa42db..68ddaeb 100644 --- a/app/Repositories/Notifications/NotificationRepository.php +++ b/app/Repositories/Notifications/NotificationRepository.php @@ -17,7 +17,9 @@ class NotificationRepository extends AbstractRepository implements NotificationC public function getNotify(): int { - return Notifications::query()->with('users') - ->whereRelation('users', 'id', '=', auth()->id())->count(); + return Notifications::query() + ->with('users') + ->whereRelation('users', 'id', '=', auth()->id()) + ->count(); } -} \ No newline at end of file +}