Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($this->group_check->destroy($id)) {
         return BaseController::httpNotFound();
     } else {
         $this->group_gestion->delete($id);
         return BaseController::httpOk();
     }
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     if ($this->delete_validation->fails()) {
         return BaseController::httpError($this->delete_validation);
     } elseif (!$this->friend_check->exist()) {
         return BaseController::httpNotFound();
     } else {
         $this->friend_gestion->destroy();
         return BaseController::httpOk();
     }
 }
Ejemplo n.º 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($this->comment_check->missing($id)) {
         return BaseController::httpNotFound();
     } else {
         $this->comment_gestion->destroy($id);
         return BaseController::httpOk();
     }
 }
Ejemplo n.º 4
0
 public function friendsFeed($id)
 {
     if ($this->list_validation->fails()) {
         return BaseController::httpError($this->list_validation);
     } else {
         if ($this->post_check->missingUser($id)) {
             return BaseController::httpNotFound();
         } else {
             return BaseController::httpContent($this->post_gestion->friendsFeed($id), 'friends_posts');
         }
     }
 }
Ejemplo n.º 5
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     if ($this->vote_check->badVote()) {
         return BaseController::httpNotFound();
     } else {
         $this->vote_gestion->destroy();
         return BaseController::httpOk();
     }
 }
Ejemplo n.º 6
0
 public function avatar($id)
 {
     /*if($this->avatar_validation->fails())
     		{
     			return BaseController::httpError($this->avatar_validation);
     		}else*/
     if ($this->user_check->missing($id)) {
         return BaseController::httpNotFound();
     } else {
         $this->user_gestion->avatar($id);
         return BaseController::httpOk();
     }
 }