I'm not sure if this would be more a Scout limitation or the driver here.
I have a model that contains a table for a phone number. Unfortunately I'm working with an existing database where they did not standardize these fields, as such phone numbers can contain dashes, spaces, parenthesis, etc.
So as a result I'm using a Accessor on this:
public function getPhoneAttribute($value)
{
return preg_replace("/[^A-Za-z0-9]/", "", $value);
}
However, when utilizing search it seems to ignore this and still looks for the original value with dashes, etc.
I'm not sure if this would be more a Scout limitation or the driver here.
I have a model that contains a table for a phone number. Unfortunately I'm working with an existing database where they did not standardize these fields, as such phone numbers can contain dashes, spaces, parenthesis, etc.
So as a result I'm using a Accessor on this:
However, when utilizing search it seems to ignore this and still looks for the original value with dashes, etc.