Ejemplo n.º 1
0
 public function index()
 {
     $projects = \Auth::user()->getProjects();
     $comments = Feedable::feed(Comment::ofProjects($projects));
     $activities = Feedable::feed(Activity::ofProjects($projects));
     return view('dashboard', ['projects' => $projects, 'activities' => $activities, 'comments' => $comments]);
 }
Ejemplo n.º 2
0
 public function comment(Task $task)
 {
     $comment = Comment::create(['content' => Input::get('content'), 'task_id' => $task->id, 'project_id' => $task->project_id, 'user_id' => \Auth::user()->id]);
     return $comment;
 }