Download the PHP package tecnocampos/dynamic-model-filter without Composer

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

Dynamic Model Filter for Laravel

Apply dynamic filters to Eloquent models based on request data — including support for where, whereDate, between, like, and nested relation filters. Comes with a flexible Blade form component for easy integration.


🚀 Installation

1. Require the package (for local testing)


⚙️ Setup

The package auto-registers via ServiceProvider using Laravel's package discovery.

If you're loading views from the package, they will be available under the namespace:
dynamicfilters::


✅ Usage

1. Add the Trait to your Model


2. Apply Filters in Controller


🧠 Filter Syntax Reference

Each entry in public static array $filterRequest uses the format:

Supported Types

Type Description
text Basic where
like where with %value%
date whereDate
between Two filters used for range (first, last)
relation Uses whereHas with nested filters
multi Search across multiple fields

Extra Options

Option Usage
first / last Used with between filters
field:column When input name differs from DB field
type:text/like Type used inside relation or multi-search
relation:name Relation path (user.address)
fields:field1,field2 Used with multi type
source:request Fetch value from request() (default)

🧩 Example: Advanced


🖼 Blade Component (Form) – Optional UI Integration

You can use the component to render filter forms automatically based on a simple fields array.

Basic usage


UI Templates

You can define which template is used (Bootstrap or Tailwind) via config:

  1. Set in .env:

  2. Or override in config file config/dynamic-model-filter.php:

The component will automatically load one of the following views:


Dynamic behavior


📅 Date Support (pt_BR / en)

The filter handles date input in both BR (d/m/Y) and EN (m/d/Y) formats automatically using Carbon and app locale.


✅ Requirements


🤝 Contributing

Contributions are welcome! If you find a bug or have an idea for an improvement, feel free to open an issue or submit a pull request.

How to Contribute

  1. Fork this repository
  2. Clone your fork:

  3. Create a new branch for your changes:

  4. Make your changes and commit:

  5. Push to your fork:

  6. Open a Pull Request to the main branch of this repository

Please ensure your code follows Laravel conventions and includes relevant tests if applicable.


📖 License

MIT © TecnoCampos


All versions of dynamic-model-filter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^8.0 || ^9.0 || ^10.0 || ^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 tecnocampos/dynamic-model-filter contains the following files

Loading the files please wait ....