repository = $repository; } public function notifications(): array { $user = Auth::user(); $result = $this->repository->getNotificationCount($user); return $this->success($result); } public function test(Request $request) { $result = ['id' => 1]; $resource = new JsonResource($result); return $this->success($resource); } }