This package under active developing. Please don't use it in production.
Now, you can easily apply query filter, sort and embed parameters to your Eloquent model:
$posts = Post::filter($request->input('filter', []))->get();
$posts = Post::sort($request->input('sort', []))->get();
$posts = Post::embed($request->input('embed', []))->get();
Also, you can shortly paginate their
$paginator = Post::paginateWithParams($request->all());
instead of
$paginator = Post::filter($request->input('filter', []))
->sort($request->input('sort', []))
->embed($request->input('embed', []))
->simplePagination($request->input('limit', 100))
->appends($request->all());
You can easily return success response or throw error exception from your controller.
return $this->response->data($data)->send();
return $this->response->data($data)->created($location);
return $this->response->noContent();
return $this->response->paginated($paginator);
return $this->response->errorNoFound();