Laravel PurityLaravel Purity
Introduction
  • Installation
  • Basic Usage
  • Additional Tutorials
  • Available Filters
  • Filtering
  • Sorting
  • Rename Fields
  • Relation Fields
  • Params Source
  • Allowed Fields
  • Livewire
  • Silent Exceptions
  • Filter

    • Restrict
    • Custom Filters
  • Sort

    • Null Sort
  • Upgrade Guide
Client Package
Ask a Question
GitHub
Introduction
  • Installation
  • Basic Usage
  • Additional Tutorials
  • Available Filters
  • Filtering
  • Sorting
  • Rename Fields
  • Relation Fields
  • Params Source
  • Allowed Fields
  • Livewire
  • Silent Exceptions
  • Filter

    • Restrict
    • Custom Filters
  • Sort

    • Null Sort
  • Upgrade Guide
Client Package
Ask a Question
GitHub
  • Available Filters

    • Queries and javascript examples
      • Available Filters

Queries and javascript examples

This section is a guide for front-end developers who want to use an API that uses Laravel Purity.

Available Filters

Queries can accept a filters parameter with the following syntax:

GET /api/posts?filters[field][operator]=value

By Default the following operators are available:

OperatorDescription
$eqEqual
$eqcEqual (case-sensitive)
$neNot equal
$ltLess than
$lteLess than or equal to
$gtGreater than
$gteGreater than or equal to
$inIncluded in an array
$notInNot included in an array
$containsContains
$notContainsDoes not contain
$containscContains (case-sensitive)
$notContainscDoes not contain (case-sensitive)
$nullIs null
$notNullIs not null
$betweenIs between
$notBetweenIs not between
$startsWithStarts with
$startsWithcStarts with (case-sensitive)
$endsWithEnds with
$endsWithcEnds with (case-sensitive)
$orJoins the filters in an "or" expression
$andJoins the filters in an "and" expression
Edit this page
Last Updated:
Contributors: Abbas mkhzomi
Prev
Basic Usage
Next
JS Example