Skip to content

filters ilike with postgres db #154

@Jo0kker

Description

@Jo0kker

Laravel Rest Api Version

2.9.0

Laravel Version

12

PHP Version

8.4.3

Database Driver & Version

postgres:15 on debian wsl

Description

PostgreSQL's native ILIKE operator for case-insensitive searches is not supported in the filter operators list, limiting search functionality when using PostgreSQL databases. This is particularly important for text-based searches where case sensitivity should be ignored.

Steps To Reproduce

  1. Set up a Laravel project with PostgreSQL
  2. Install lomkit/laravel-rest-api
  3. Configure a basic Resource (e.g., UserResource) with searchable fields
  4. Send a GET request to /api/users with:
{
    "filters": [{
        "field": "name",
        "operator": "ilike",
        "value": "%Test%"
    }]
}
  1. Receive validation error: "The selected search.filters.0.operator is invalid"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions