| | |
| | | 'total' => $total_count, |
| | | 'page' => $offset, |
| | | 'per_page' => $limit, |
| | | 'pages' => ceil($total_count / $limit), |
| | | 'pages' => ceil($total_count / $limit) |
| | | ], |
| | | 'has_more' => ($offset * $limit + count($notifications)) < $total_count |
| | | ] |
| | | ]; |
| | | |
| | | // Cache the result |
| | |
| | | 'total' => 0, |
| | | 'page' => $offset, |
| | | 'per_page' => $limit, |
| | | 'pages' => 0, |
| | | 'pages' => 0 |
| | | ], |
| | | 'has_more' => false |
| | | ] |
| | | ]); |
| | | } |
| | | } |
| | |
| | | 'total' => (int)$total_count, |
| | | 'page' => $offset, |
| | | 'per_page' => $limit, |
| | | 'pages' => ceil($total_count / $limit), |
| | | 'pages' => ceil($total_count / $limit) |
| | | ], |
| | | 'has_more' => ($offset + $limit) < $total_count |
| | | ] |
| | | ]; |
| | | |
| | | // Cache the results |
| | |
| | | 'total' => 0, |
| | | 'page' => $offset, |
| | | 'per_page' => $limit, |
| | | 'pages' => 0, |
| | | 'pages' => 0 |
| | | ], |
| | | 'has_more' => false |
| | | ] |
| | | ]; |
| | | } |
| | | } |