Download the PHP package ravaelles/filterable without Composer

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

Filtering and searching Eloquent records for Laravel 5.*

Package to handle filtering of records in Laravel 5.*, ready to work with MongoDB.

Define filters easily. Save time by using provided bootstrap view which displays all the filters and properly styles select elements (and far more!). Oh, and there's also a nice search box, too! :)

Install

Via Composer

Usage

(1)   Open config/app.php and add to the end of providers this entry:


(2)   Now open command line in root of your project and publish a view:

Feel free to modify it, it's now in resources\views\packages\filterable\filtering.blade.php


(3)   Notice that filtering.blade.php uses @push('scripts') operator. It appends all the javascript scripts to the end of the html, when jQuery has already been loaded to avoid jQuery is not defined error. To make it work, please add @stack('scripts') part just after you load your last script using <script> tag. Notice the @stack blade operator is available since about Laravel 5.2.20.


(4)   Now in your model add this trait:

Every model that you want to be filterable will need this trait.


(5)   It's time to define filters to be used (variable $filters). We will define some example filters so you can see how it works. In your controller, just where you retrieve the records, add this:

Notice that you can apply your own, custom where clauses just before the ->filterable part.


(6)   Finally, in your view add this line which will automatically display the filters using selects:

Feel free to modify this file as you wish.


(7)   If you wish to use search box functionality then make sure to add ->searchable() line in your controller like this:

...and in your model add a list of fields you want to search against e.g.

It will search for text from the search box in any of these fields.


(8)   You are now able to use this package and dynamically filter the records! :)

License

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


All versions of filterable with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.1
php Version >=5.3.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 ravaelles/filterable contains the following files

Loading the files please wait ....