Download the PHP package lacodix/laravel-model-filter without Composer

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

laravel-model-filter

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

This package allows you to filter, search and sort models while fetching from database with ease. It contains additional functionality to use query strings to filter, search and sort.

With this package you can easily filter, search and sort your Eloquent models. It supports various filter types like strings, dates, numbers, and enums out of the box. You can also create complex custom filters to handle any specific database logic.

Additionally you can use the visualisation functionality of filters.

Documentation

You can find the entire documentation for this package on our documentation site

See our Upgrade Guide for information on how to upgrade from older versions.

Installation

Basic Usage

Filter

Create your first filter

Filters can be applied directly to models, but they can also be easily applied to relations and nested relations using the RunsOnRelation trait. This automatically wraps the filter logic in a whereHas closure and correctly qualifies the field names using the related table.

Search

Visualize

All filters have a blade template that can visualize the filter with one or multiple input fields. To visualize all filters of a dedicated model you can use a blade component:

Grouping

Sometimes you don't need all of the filters for all parts of a web application. Maybe there shall be different filters be available to the backend as in the frontend, or different user types shall be able to use different filters.

For such cases this package offers filter grouping when adding filters to models

The groups can be used in the scopes

or

Testing

Contributing

Please run the following commands and solve potential problems before committing and think about adding tests for new functionality.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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


All versions of laravel-model-filter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-intl Version *
illuminate/contracts Version ^11.0|^12.0|^13.0
spatie/laravel-package-tools Version ^1.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 lacodix/laravel-model-filter contains the following files

Loading the files please wait ...