/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { if ($this->group_check->show($id)) { return BaseController::httpNotFound(); } else { return BaseController::httpContent($this->group_gestion->show($id), 'group'); } }
public function dislikes($id) { if ($this->vote_check->missingPost($id)) { return BaseController::httpNotFound(); } else { return BaseController::httpContent($this->vote_gestion->dislikes($id), 'dislikes'); } }
public function waiting($id) { if ($this->list_validation->fails()) { return BaseController::httpError($this->list_validation); } elseif ($this->friend_check->noWaiting($id)) { return BaseController::httpNotFound(); } else { return BaseController::httpContent($this->friend_gestion->waiting($id), 'waiting_friends'); } }
public function followers($id) { if ($this->list_validation->fails()) { return BaseController::httpError($this->list_validation); } if ($this->follow_check->noFollowers($id)) { return BaseController::httpNotfound(); } else { return BaseController::httpContent($this->follow_gestion->followers($id), 'followers'); } }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { if ($this->comment_check->missing($id)) { return BaseController::httpNotFound(); } else { return BaseController::httpContent($this->comment_gestion->show($id), 'comment'); } }
public function voteFeed() { if ($this->list_validation->fails()) { return BaseController::httpError($this->list_validation); } else { return BaseController::httpContent($this->post_gestion->voteFeed(), 'vote_feed'); } }
/** * Check if the user exist and has the right password. * * @return Response */ public function login() { if ($this->login_validation->fails()) { return BaseController::httpError($this->login_validation); } else { if ($this->user_check->badLogin()) { return BaseController::httpNotFound(); } else { return BaseController::httpContent($this->user_gestion->login()); } } }