/** * @api {delete} /event-logs/:id/likes Unlike A EventLog * @apiGroup Likes * @apiDescription Unlikes the underlying content of an event. (e.g. If it's a new post event, unlikes the post) * @apiUse RequiresAuthentication * * @param EventLog $eventLog * * @return \Illuminate\Http\Response * @throws \Exception */ public function destroyLike(EventLog $eventLog) { $user = $this->requireAuthentication(); $eventLogLikeManager = $eventLog->getLikeManager(); $success = !!$eventLogLikeManager->unlike($user); return $this->response(['success' => $success, 'event' => $eventLog->fresh()]); }