return $response->withHeader('Content-Type', 'application/json')->write(json_encode($result));

setInterval(() => gridOptions.api.refreshServerSideStore( purge: true ); , 30000); // refresh every 30 seconds

// Build your base query, including any relationships or default ordering $query = Product::query()->orderBy('id');

$sortModel = isset($_GET['sortModel']) ? json_decode($_GET['sortModel'], true) : []; $filterModel = isset($_GET['filterModel']) ? json_decode($_GET['filterModel'], true) : [];

The true power of AG Grid emerges when you fully utilize its server-side row model, which allows your PHP backend to handle complex data operations that would be impossible to perform on the frontend alone.

Works with Vite, Webpack, or simple tags.