3.12.0
Added
- Match by datetime
class PostRepository extends Repository
{
public static $match = [
'published_at' => RestifySearchable::MATCH_DATETIME,
];
}Request:
GET: /restify-api/posts?published_at=2020-12-01- Match by array
class PostRepository extends Repository
{
public static $match = [
'published_at' => RestifySearchable::MATCH_ARRAY,
];
}Request:
GET: /restify-api/posts?id=1,2,3This will be converted to:
->whereIn('id', [1, 2, 3])- Negate a match
GET: /restify-api/posts?-id=1,2,3This will return all posts where doesn't have the id in the [1,2,3] list.
You can apply - (negation) for every match:
GET: /restify-api/posts?-title="Some title"