Last updated 3 years ago
Note: These below filter parameters only work with DB::where("collection-name")->all() function.
Sort by DESC is default
You can sort by ASC from url as below
Limit by 0 index is default
You can limit collection from url as below
only can retrieve the data with specific keys.
only
example.com/posts?sort=ASC
example.com/posts?limit=4
example.com/posts?only=title,author,category
example.com/posts?limit=2
example.com/posts?sort=DESC
example.com/posts?limit=4&sort=ASC&only=title
example.com/posts?limit=10&sort=DESC&only=username,email