Skip to content

4.12.1

Choose a tag to compare

@binaryk binaryk released this 21 Mar 19:21
· 9 commits to 4.x since this release
a39c667

Added

  • Partial match:
    public static function matches(): array
    {
        return [
            'name' => MatchFilter::make()
                ->setType(RestifySearchable::MATCH_TEXT)
                ->partial(),
            'code' => MatchFilter::make()
                ->setType(RestifySearchable::MATCH_TEXT)
                ->strict(),

So now if your frontend will call:

/users?name=Johnthe search will return back even users with a name like: John Doe

If you are using ->strict() modifier, which is by default for all matches, then the API will search only for the name John.