Exemplo n.º 1
0
 /**
  * Get all the comments that were made on a Project
  * @param  integer $id
  * @return collection
  */
 public function getComments($id)
 {
     $comments = Comment::project($id)->get();
     return $comments;
 }
 /**
  * Delete One Project Comment
  * @param  int $projectId
  * @param  int $commentId
  * @return view
  */
 public function deleteOneProjectComment($projectId, $commentId)
 {
     Comment::where('project_id', $projectId)->where('id', $commentId)->delete();
     return redirect()->route('projects.show')->with('info', 'Comment deleted successfully');
 }