Пример #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();
     }
 }
Пример #2
0
 public function destroy()
 {
     if ($this->delete_validation->fails()) {
         return BaseController::httpError($this->delete_validation);
     } else {
         if ($this->follow_check->missing()) {
             return BaseController::httpNotfound();
         } else {
             $this->follow_gestion->destroy();
             BaseController::httpOk();
         }
     }
 }
Пример #3
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();
     }
 }
Пример #4
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();
     }
 }
Пример #5
0
 /**
  * Update the privacy for a specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function privacy($id)
 {
     if ($this->privacy_validation->fails($id)) {
         return BaseController::httpError($this->privacy_validation);
     } else {
         if ($this->post_check->missing($id)) {
             return BaseController::httpNotFound();
         } else {
             $this->post_gestion->privacy($id);
             return BaseController::httpOk();
         }
     }
 }
Пример #6
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();
     }
 }
Пример #7
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();
     }
 }