public function postUpdateNotif() { if (!($agency = \Agency::getAgency())) { return \Response::json(['type' => 'danger', 'message' => 'Not an agency account']); } try { $notification = \Agency::updateNotification(trim(\Input::get('id')), $agency, ['has_read' => 1]); return \Response::json(['type' => 'success', 'message' => 'Notification updated']); } catch (\Exception $e) { return \Response::json(['type' => 'danger', 'message' => $e->getMessage()]); } }