Download the PHP package victormgomes/query-params without Composer

On this page you can find all versions of the php package victormgomes/query-params. 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 query-params

Query Params for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

A powerful, zero-boilerplate package to handle complex API query parameters (filtering, sorting, field selection, relationship loading, and pagination) using native Laravel validation and optimized Eloquent queries.

🚀 Features


📦 Installation

  1. Install the package via composer:

  2. Publish the configuration file:

⚡ Quick Start

Simply add the #[MapQueryParams] attribute and the HasQueryParams trait to your FormRequest:

In your controller:


🛡️ Security & Visibility

The package strictly follows Laravel's internal visibility rules. Your API will never leak sensitive data because it respects:

  1. $visible (Allow-list): If defined, only these fields will be exposed in metadata and available for query operations.
  2. $hidden (Deny-list): Fields in this array are strictly excluded from all operations.

🔗 Fancy URL Specification

The package supports "Sentence Style" parameters, allowing you to combine multiple operations into a single query key.

Operation URL Key Fancy Sentence Format Example
Filtering filter field:operator:value ?filter=name:like:Victor,active:true
Sorting sort field:direction ?sort=created_at:desc,name:asc
Fields fields field1,field2 ?fields=id,name,email
Includes include relation1,relation2 ?include=domains,active_tags
Pagination page key:value ?page=number:2,limit:50

Zero-Config Relationship Aliases

You don't need to worry about naming conventions. The package automatically discovers:

Supported Filter Operators

Operator Description URL Example
eq Equal (Default) status:active
ne Not Equal role:ne:admin
like Case-sensitive search name:like:John
ilike Case-insensitive search email:ilike:HOTMAIL
gt / gte Greater than (or equal) price:gt:100
lt / lte Less than (or equal) age:lte:18
in / nin In list / Not in list id:in:1,2,3
null / notnull Is Null / Is Not Null deleted_at:null:true
between Between two values price:between:10,50
contains JSON/Array contains tags:contains:urgent
fts Full Text Search content:fts:laravel

🖥️ Frontend Dynamic Filters (Metadata)

The package provides a curated "Definitive Metadata" structure for frontend developers to build dynamic UI filters. It deduplicates aliases and only shows the most relevant names.

Example JSON Response:


🛠️ Advanced: Pluggable Drivers

Extend the package to handle custom database behaviors by defining a Resolver.

Your driver must implement the Victormgomes\QueryParams\Contracts\FieldResolver interface to handle custom filtering, sorting, and output transformation.


⚖️ License

The MIT License (MIT). Please see License File for more information.


All versions of query-params with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^13.0
illuminate/support Version ^13.0
illuminate/database Version ^13.0
illuminate/http Version ^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 victormgomes/query-params contains the following files

Loading the files please wait ...