The table below hits /api/users.php on every page change, sort or filter. Use the inspector to see the live AJAX request and response JSON.
Click "Fetch" to see a live response from the server-side handler.
// api/users.php
$req = ServerSideRequest::from_globals(); // parses $_GET
$result = MockData::query($allRows, $req, $allowed);
// Reads: page, per_page, sort, sort_dir, search, search_columns[], filters[col]
// Returns: { data: [...], total: N, page: N, per_page: N, last_page: N }
$resp = new ServerSideResponse($result['data'], $result['total'],
$req->page(), $req->per_page());
echo $resp->to_json();