Download the PHP package ahmadhsalim/eloquent-filter-resolver without Composer

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

Eloquent Filter Resolver

The Eloquent Filter Resolver is a package that allows you to resolve a filter string into an Eloquent query in Laravel. It provides a convenient way to filter Eloquent models based on various conditions and operators.

Installation

You can install the Eloquent Filter Resolver package via Composer. Run the following command:

Usage

To use the Eloquent Filter Resolver, follow the example below:

In the above example, we create an Eloquent query for the User model and apply a filter using the Eloquent Filter Resolver. The filter string contains(name, "john") and eq(status, active) filters the users whose names contain "john" and have an active status.

Supported Operators

The Eloquent Filter Resolver supports the following operators:

Value Formats

Boolean and Null Values

Nested Brackets

The Eloquent Filter Resolver supports nested brackets to create complex filter expressions. For example:

In the above example, the filter condition checks if the name is "John" and the status is either "active" or "inactive".

Usage with Relations

The Eloquent Filter Resolver also supports filtering on related models using dot notation. For example:

In the above example, the filter condition checks if the related role of the user has a name equal to "admin".

Usage with Boolean and Null Values

Boolean and null values can be used in filter conditions as follows:

In the above example, the filter condition checks if the is_active field is true and the deleted_at field is null.

Contributing

Contributions to the Eloquent Filter Resolver package are welcome. If you find any issues or want to suggest improvements, please create a GitHub issue

License

The Eloquent Filter Resolver package is open-source software licensed under the MIT license.


All versions of eloquent-filter-resolver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^9.0|^10.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 ahmadhsalim/eloquent-filter-resolver contains the following files

Loading the files please wait ....