Download the PHP package tijanidevit/query-filter without Composer

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

Query Filter for Laravel

A simple, expressive, and powerful Laravel package that provides dynamic Eloquent model filters with clean syntax. It helps you build reusable, maintainable, and readable query logic in Laravel applications.

Latest Version on Packagist Downloads


🎯 Why Use This Package?

In many Laravel applications—especially admin dashboards, reporting systems, and search pipelines—developers often repeat the same verbose filtering logic in controllers:

With Query Filter, you can simplify this down to a single, beautifully readable chain:

It safely ignores empty parameters automatically, so you never write an if (request()->filled(...)) block again.


🚀 Installation

Install the package via Composer:

(Optional) The package supports Auto-Discovery. If you are using an older version of Laravel (pre-5.5), manually register the provider in config/app.php:

Applying the Trait

Query Filter utilizes Laravel Scopes. To enable filtering on a model, add the Filterable trait:


⚡ Database Drivers & ILIKE Support

The package dynamically detects your database connection. If you are using PostgreSQL, all search(), searchIn(), orSearch(), and searchByRelation() methods will automatically utilize the case-insensitive ILIKE operator. For all other SQL databases (MySQL, SQLite), it will default natively to LIKE.


📚 Available Filters

filterBy()

Filter by a single column or multiple columns using exact matches.

filterByRelation()

Filter directly using nested related models cleanly without verbose whereHas queries.

filterWhereIn()

Flexible WHERE IN filtering parsing arrays and strings automatically.

search(), searchIn(), and orSearch()

Powerful dynamic LIKE search abstractions.

filterFromRequest()

Automatically bind constraints directly from incoming HTTP Request objects by mapping input keys to database columns.

filterByDate(), filterByMonth(), filterByYear(), filterByDateRange()

Timezone-aware date parsing spanning specific bounding frames neatly.

Sorting Helpers

Chainable dynamic chronological sorting bounds.


💡 Advanced Best Practices

Query Filter macros are designed to act composably, linking infinitely together parsing structural queries perfectly.

The "God Query" Approach

For complex Admin panels parsing 15 distinct variables simultaneously, combine macros sequentially:

Structural Security Recommendations

  1. Always validate request inputs before blindly dumping request() into maps.
  2. Use arrays or comma-delimited structures intelligently parsed with filterWhereIn() bridging dashboard parameters structurally.
  3. Funnel heavy endpoint evaluations entirely into filterFromRequest() maps for ultra-slim API Controllers.

🛠 Requirements

📄 License

This package is open-sourced software licensed under the MIT license.


All versions of query-filter with dependencies

PHP Build Version
Package Version
No informations.
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 tijanidevit/query-filter contains the following files

Loading the files please wait ...