/**
* Save multiple notifications sent
* at once.
*
* @param array $notifications
* @return mixed
*/
public function storeMultiple(array $notifications)
{
$this->db->beginTransaction();
$stackId = $this->db->table($this->notification->getTable())->max('stack_id') + 1;
foreach ($notifications as $key => $notification) {
$notifications[$key]['stack_id'] = $stackId;
}
$insert = $this->db->table($this->notification->getTable())->insert($notifications);
$this->db->commit();
return $insert;
}