public function index(Request $request, Application $app) { $model = new User($app['neo']); $users = $model->getAll(); if ($users) { return $this->sendJson($users, 200); } else { return $this->sendJson(['success' => false], 404); } }