/**
  * Mark the given notifications as read.
  *
  * @return Response
  */
 public function markAsRead()
 {
     $ids = $this->getParameter('ids', []);
     Notification::whereIn('id', $ids)->update(['read' => 1]);
 }
 /**
  * {@inheritdoc}
  */
 public function create(Authenticatable $user, array $data)
 {
     $creator = array_get($data, 'from');
     $notification = Notification::create(['user_id' => $user->id, 'created_by' => $creator ? $creator->id : null, 'icon' => $data['icon'], 'body' => $data['body'], 'action_text' => array_get($data, 'action_text'), 'action_url' => array_get($data, 'action_url')]);
     return $notification;
 }