| @@ 53-59 (lines=7) @@ | ||
| 50 | $read->user_id = $request->user()->user_id; |
|
| 51 | $read->key = $action; |
|
| 52 | $read->value = 1; |
|
| 53 | if ($read->save()) |
|
| 54 | { |
|
| 55 | return $this->response->array(array('statusText'=>'OK')); |
|
| 56 | } |
|
| 57 | else { |
|
| 58 | return $this->response->errorInternal(); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | } |
|
| 62 | elseif ($action === 'unread' || $action === 'unsticky') |
|
| @@ 64-70 (lines=7) @@ | ||
| 61 | } |
|
| 62 | elseif ($action === 'unread' || $action === 'unsticky') |
|
| 63 | { |
|
| 64 | if (NotificationAttrib::where('notifications_id', $id)->delete() >= 0) |
|
| 65 | { |
|
| 66 | return $this->response->array(array('statusText'=>'OK')); |
|
| 67 | } |
|
| 68 | else { |
|
| 69 | return $this->response->errorInternal(); |
|
| 70 | } |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||