/**
  * Ajoute un nouveau commentaire pour une activité
  *
  * @param Requests\PostActivityRequest $request
  * @return JsonResponse
  */
 public function store(Requests\PostActivityRequest $request)
 {
     $activity = Activity::findOrFail($request->input('activity_id'));
     $this->authorize('comment', $activity);
     $comment = $activity->comments()->create(['user_id' => $request->user()->id, 'content' => $request->input('content')]);
     return view('activities.comment', compact('comment'));
 }
 /**
  * Enregistre une nouvelle activité
  *
  * @param Requests\postActivityRequest $request
  * @return JsonResponse
  */
 public function store(Requests\PostActivityRequest $request)
 {
     $activity = $request->user()->activities()->create(['content' => $request->input('content'), 'type' => 'status']);
     return view('activities.activity_li_post', compact('activity'));
 }