Download the PHP package 7amoood/eloquent-filter without Composer

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

Eloquent Filter

A Laravel package that provides an Eloquent trait for filtering, sorting, searching, and range queries driven entirely by request parameters.

Requirements

Installation

The service provider is auto-discovered. To publish the config file:

Quick Start

Add the HasFilter trait to your model and define which columns are filterable:

Then call the filter() scope in your controller:

All filtering is now controlled via query string parameters.

Filter Types

Sorting

Sort results by an allowed column.

Search

Search across multiple columns with a single term:

Or search specific fields:

Searchable columns are defined in $filterSearchCols.

Column Filters

Filter by exact column values (comma-separated for multiple):

Passing an empty value filters for NULL:

Allowed columns are defined in $filterCols.

Nested Relationship Filters

Filter through relationships using $filterColsChilds:

Fetch

Fetch specific records by ID (or another column), bypassing any limit:

The $filterFetch property controls allowed columns (defaults to ['id']).

Column Range

Filter by a value range on any column (numeric, string, etc.). Supports providing both from and to, or just one of them:

Allowed columns are defined in $filterRangeColumn.

Date Range

Filter by a date range:

Allowed columns are defined in $filterRangeDate.

Time Range

Filter by a time range (handles overnight spans like 22:00 to 06:00):

Allowed columns are defined in $filterRangeTime.

Limit

Override the per-page count (capped by $filterLimit or the config default):

Model Properties Reference

Property Type Description
$sortCols array Columns allowed for sorting
$filterSearchCols array Columns included in search queries
$filterCols array Columns allowed for exact-match filtering
$filterColsChilds array Relationship columns for nested filtering
$filterFetch array Columns allowed for fetch (default: ['id'])
$filterRangeColumn array Columns allowed for generic value range filtering
$filterRangeDate array Columns allowed for date range filtering
$filterRangeTime array Columns allowed for time range filtering
$filterLimit int Max per-page limit for this model

Column Aliasing

All column arrays support aliasing via key-value pairs. The key is the public name used in the request, and the value is the actual database column:

Configuration

After publishing, the config file is at config/eloquent-filter.php:

Custom Request Key

You can override the request key per-call:

Dynamic Sort Columns

Add sort columns at query time with the sortCols scope:

License

MIT


All versions of eloquent-filter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.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 7amoood/eloquent-filter contains the following files

Loading the files please wait ...