laravel-exa
laravel-exa copied to clipboard
Feat: Creating conditional for relationships filter
With this PR, it will be possible to apply filters not only to the main table, but also to its relationships.
$query = Datatable::applyFilter($query, $datatableDTO, [
'field_a', 'field_b', 'relationship.field_a', 'relationship.field_b'
]);
``
Now that I think about this, I think that this won't work with joins when you need to specify the table - using aliases or just because it has the same field in two different tables.
We need to test this further before merging it.
This could potentially create issues with queries not using relationships.