Download the PHP package larasquad/filter without Composer

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

Larasquad Filter

This package allows you to filter resource based on a request in a simple way and makes you controller code clean.

Installation

You can install the package via composer:

Basic usage

Make a filter class and extend it by

or, you can generate it by

It will generate a filter class on you app\Filters directory.

Specify the $request attributes which you want to filter in $filterable array.

Note that, if you put an attribute on the $filberable array which is not available in database column, in these case, you have to write a method on it.

Example,

In these case, from and to attribute are not exists in my database column but I have send the attributes via $request, then I have to specify the from and to method else it will get an error.

Now, inject the class in you controller method where you have injected the Request $request class

Replace the Request $request from your method with UserFilter $filter

It will automaticall initiate the Request $request in it's parent constructor. Now use the Filterable trait in you model.

It's done. Now you can you the filter method in your controller and pass the $filter object in the method.

By default, It filters the model by using Laravel default where clause. Here, $request input name is used as column and $request input value is used as search value You can override the search query by writing a method on your Filter Class . You have to name it like the model database column name or the camelCase or snake_case of it.

License

The MIT License (MIT)


All versions of filter with dependencies

PHP Build Version
Package Version
No informations.
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 larasquad/filter contains the following files

Loading the files please wait ....