Download the PHP package skyraptor/modelsearch without Composer
On this page you can find all versions of the php package skyraptor/modelsearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package modelsearch
Laravel ModelSearch
Laravel ModelSearch is a lightweight, easy to use package to create dynamic search queries for specific Models with Laravel or Illuminate 5.8.
Requirements
-
Laravel 5.7+
Installation
Composer
Simply run to install the package in its latest version, after that run . The package will register its own ServiceProvider using Laravels package discovery.
Configuration
This package includes its own configuration file which you should publish by with the command and following the instuctions on screenafterwards. In the configuration file you have to adjust the namespace for you filters directory and your request filter prefix.
Filters
In order to define a filter you have to create a folder that is named as your model within your filters directory. Within this folder you can create filter specific to the model. For example:
Your filter has to extend ModelSearch\Contracts\Filter.
Request Filters
The request filter prefix in the configuration defines the prefix being used for filter names in the request parameters. This can be used to allow the user to apply filters trought POST and GET requests. This has to be done manually by calling the method and providing a Request instance.
Always remember to apply filters in the appropiate order.
You can change the filter prefix of the Search after by calling the method, providing a new preifx.
Examples
The following example shows you how to use the Search in your Controller:
All versions of modelsearch with dependencies
illuminate/http Version 5.7.*||5.8.*
illuminate/database Version 5.7.*||5.8.*