Download the PHP package zaruto/queryable without Composer

On this page you can find all versions of the php package zaruto/queryable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package queryable

Laravel Queryable

Attribute-first, type-safe query composition for Laravel Eloquent models.

zaruto/queryable helps API teams safely expose search, filter, and sort query params without allowing arbitrary field/operator access.

Roadmap

Track planned feature waves in GitHub Projects:

Compatibility

Installation

Publish config (optional):

Quickstart (Under 5 Minutes)

1. Add traits + attributes to a model

2. Chain query scopes in controller/repository

3. Call endpoint with query params

Public API (Stable Surface)

Configuration

config/queryable.php:

Notes

Attribute-First With Method Fallback

The package resolves model config in this order:

  1. Attributes (#[QueryableSearchable], #[QueryableFilterable], #[QueryableSortable])
  2. Static methods (searchable(), filters(), sortable())

Use method fallback when you need dynamic configuration or gradual migration.

Method fallback example

Filter Grammar Reference

Queryable uses a token parser and supports grouped boolean expressions.

Grammar shape

Supported operators

Operator Meaning Example filter snippet
eq equals status eq active
ne not equals status ne archived
gt greater than score gt 80
gte greater or equal score gte 80
lt lower than score lt 80
lte lower or equal score lte 80
like raw SQL like value name like ali%
contains %value% name contains ali
starts_with value% email starts_with admin
in in comma list status in active,pending
not in not in comma list status not in blocked,deleted

Boolean and grouping

Example:

Query URL Examples

Relation Fields

Use dot notation for relation fields:

Current behavior:

Sorting Behavior

Examples:

Strict Mode and Errors

When strict_mode=true:

Example invalid requests:

End-to-End Example

Testing and Development

CI workflow coverage:

Pre-Tag Release Gate

Run this before creating any new release tag:

This runs, in order:

  1. composer install
  2. ./vendor/bin/pint --test
  3. ./vendor/bin/phpstan analyse --error-format=table
  4. ./vendor/bin/pest --ci

For additional Laravel matrix spot-checks (recommended for release candidates/finals):

This additionally runs sequential checks for:

Tagging rule: only create/push a tag if the gate passes and the working tree is clean.

Roadmap (Concise)

License

MIT


All versions of queryable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^12.0||^13.0
illuminate/database Version ^12.0||^13.0
illuminate/http Version ^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zaruto/queryable contains the following files

Loading the files please wait ...