public function index($id = null) { $analysis = $this->getAnalyses($id); if (!$analysis) { return $this->respondNotFound('User has no analyses'); } return $this->setStatusCode(200)->respond(["analyse" => $this->analyseTransformer->transformCollection($analysis->all())]); }
public function index($id = null) { $videos = $this->getVideos($id); if (!$videos) { return $this->respondNotFound('User has no videos'); } return $this->setStatusCode(200)->respond(["videos" => $this->videoTransformer->transformCollection($videos->all())]); }
public function index($id = null) { $groups = $this->getGroups($id); if (!$groups) { return $this->respondNotFound('No groups found'); } return $this->setStatusCode(200)->respond(["group" => $this->groupTransformer->transformCollection($groups->all())]); }
public function index() { $users = User::all(); return $this->setStatusCode(200)->respond(["users" => $this->userTransformer->transformCollection($users->all())]); }