Skip to content

Conversation

Shay12tg
Copy link

$builder = $this->modelsManager->createBuilder()
->columns('id, name')
->from('Orders')
->where('client_id=' . $client_id);
$dataTables = new DataTable();
$dataTables->fromBuilder($builder)->sendResponse();

This code should show orders by client id. however, when the client uses datatables's search, the results shows all clients orders that matches the search (bypassing my condition).

This commit should fix that.

$builder = $this->modelsManager->createBuilder()
					->columns('id, name')
					->from('Orders')
					->where('client_id=' . $client_id);
$dataTables = new DataTable();
$dataTables->fromBuilder($builder)->sendResponse();

This code should show orders by client id. however, when the client uses datatables's search, the results shows all clients orders that matches the search (bypassing my condition).

This commit should fix that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant