Download the PHP package morningtrain/laravel-filters without Composer

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

This package provides a series of filters that can be used to constrain a Laravel DB Query based on request values.

Installation

Via Composer

Included Filters

All filters can be used using the base Filter class at: MorningTrain\Laravel\Filters\Filter. It should not be confused with MorningTrain\Laravel\Filters\Filters\Filter that are the base class all filters are extending.

Basic

Filter by a basic variable static variable.

The following example look for filter_request_parameter in the request, and apply it to the query for the column of the same name.

It corresponds to:

Like in the following example, it is possible to add a closure as the second parameter.

The closure will get the query as well as the filter value as parameters. It makes it possible to apply some custom logic.

Always

Always run a closure and apply something to the query.

With

Eager load relations on the query.

Paginate

Apply pagination to the query. It is important that this filter is applied last.

It expects the request values $page and $per_pageto be present.

Order

The order filter can be configured to sort the data by specific columns or using scopes.

To specify the columns to sort by, call the only method on the filter. The following example will look for sort[id] and sort[created_at] in the request.

The values of sort[<column_name>] can be either asc or desc.

Calling the scope method, it is possible to also configure any scopes to be used. It will be looking in the request for any sort keys that match the scope name.

Default values can also easily be added:

Credits

This package is developed and actively maintained by Morningtrain.

 _- _ -__ - -- _ _ - --- __ ----- _ --_  
(         Morningtrain, Denmark         )
 `---__- --__ _ --- _ -- ___ - - _ --_ ´ 
     o                                   
    .  ____                              
  _||__|  |  ______   ______   ______ 
 (        | |      | |      | |      |
 /-()---() ~ ()--() ~ ()--() ~ ()--() 
--------------------------------------

All versions of laravel-filters with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
illuminate/http Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/database Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
morningtrain/laravel-support Version ^1.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 morningtrain/laravel-filters contains the following files

Loading the files please wait ...