userRepository = $userRepository; } public function handle(Request $request, ConnectionInterface $httpConnection) { $this->userRepository ->getUsers() ->then(function ($users) use ($httpConnection) { $httpConnection->send( respond_html($this->getView($httpConnection, 'server.users.index', ['users' => $users])) ); $httpConnection->close(); }); } }