Ejemplo n.º 1
0
 /**
  * @api            {delete} /posts/:postId Delete A Post
  * @apiGroup       Task Posts
  * @apiDescription Delete a post on a task.
  * @apiUse         RequiresAuthentication
  * @apiUse         GenericSuccessResponse
  *
  * @param Post $post
  *
  * @return \Illuminate\Http\Response
  */
 public function destroy(Post $post)
 {
     $this->requireUserOrRole($post->getUser(), Role::ROLE_MANAGE_POSTS);
     $success = $post->delete();
     return $this->successResponse($success);
 }