Download the PHP package eth0/laravel-filters without Composer

On this page you can find all versions of the php package eth0/laravel-filters. 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-filters

Laravel Model Filters

An clean way of filtering laravel models by query strings.

GitHub issues GitHub forks GitHub stars GitHub license Twitter

Installation

You can install this package via composer using this command:

The package will automatically register itself, but if your laravel versions is < 5.5 you will need to add
service provider under your file.

Documentation

Once the package is installed there will be 2 new artisan commands.

We can then generate a new model filter just by typing this will generate a new php file under folder with the name which will look like below.

On the variable we can register all our model filters.

However we do not have created yet the model filters so lets create now the model filters.

Note: Pro tip if you add an prefix before your file like below Model a new folder Model will be generated inside your Filters folder so you can keep your filters tidy.

Below is one of the file generated:

On the mappings method we can return an array of mappings for example if we do want to convert a few words to match our database columns like:

Next on the method we can build our query filter like:

Once we have everything ready the last step is to add a scope to our laravel model which this filter will be used.

And then we can use our model filters everywhere on our applications just by adding the filter scope like:

Now we have our filters setup which mean we can now send to our server query string this will return us all the records where the status is active.

Road Map

Here's the plan for what's coming:

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see feel free to make any pull request to make this package even better.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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


All versions of laravel-filters with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.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 eth0/laravel-filters contains the following files

Loading the files please wait ....