I am trying to get both fields in an api enpoint so that it queries based on that. example.
api/evenSession/123123123/eventSession?token=1234656&filter= chris moreno
my controller searches by first or last name. But i want to create an endpoint that it queries the database if it's passed in "chris moreno"
This is my $filter code
if(preg_match_all('/^[A-Z]*[a-z]*(-|\s)[A-Z]*[a-z]*$/', $filter)){
$searchFields = [
'a.lastName',
'a.firstName'
];
I'd like to be able to catch both fields (chris and moreno) in my filter so that I can pass that over to my query so that it can check for people checked in with first and last name (narrow the search)