Closed yaman3bd closed 2 years ago
is it possible to access the other request parameters within the filter function? because I am working on filtering the data in a way like:
{ products: [id, id, id], operator: '=' }
so in my products function, I want to be able to use the operator parameter as well because the operator is changeable it could be'!=' or '='
'!=' or '='
is it possible to access the other request parameters within the products function?
it would be amazing if it could be something like this:
However, I thought of this idea I do not know if it is right or not
Yep! You can access it with the input() method.
input()
You'd access it in your method via:
$operator = $this->input('operator');
@Tucker-Eric solved the problem! thanks a lot
is it possible to access the other request parameters within the filter function? because I am working on filtering the data in a way like:
so in my products function, I want to be able to use the operator parameter as well because the operator is changeable it could be
'!=' or '='
is it possible to access the other request parameters within the products function?
it would be amazing if it could be something like this:
However, I thought of this idea I do not know if it is right or not