Download the PHP package makeabledk/laravel-querykit without Composer

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

Laravel Query Kit

Latest Version on Packagist Build Status StyleCI

This package provides a handy way to query eloquent-scopes on model instances in Laravel.

Traditionally you may find yourself having a scopeAccepted and then additionally a ìsAccepted helper method on your model.

Well, Bon Voyage code-duplication. QueryKit is here to the rescue! 🔥

--

Makeable is web- and mobile app agency located in Aarhus, Denmark.

Installation

You can install this package via composer:

For Laravel version prior 5.5: Add the service provider to your config/app.php:

Usage

Whenever you have a query scope on an Eloquent Model, you can apply the following trait to add QueryKit:

Out of the box Laravel offers us a convenient way to query against our database:

But with query-kit you are now also able to check if a model instance passes a given scope:

Pretty cool, right?

Much more advanced functionality is supported than this simple example.

See Currently supported methods further down.

Provided methods on QueryKit

passesScope

failsScope

Currently supported methods

As of this moment QueryKit supports the following query methods

QueryKit tries to support most of the argument types that Eloquent Builder supports, but there might exceptions.

Also, do note that advanced joins and relations queries won't work.

Extending QueryKit

Say that you want to add functionality for Laravel QueryBuilder's 'whereBetween' method:

Create a WhereBetween that implements \Makeable\QueryKit\Contracts\QueryConstraint.

Next register the constraint in your AppServiceProvider's register method:

You can also use the above method to override the existing implementations.

Related packages

Make sure to checkout our makeabledk/laravel-eloquent-status package that streamlines the way you handle model-state across your application.

Testing

You can run the tests with:

Contributing

We are happy to receive pull requests for additional functionality. Please see CONTRIBUTING for details.

Credits

License

Attribution-ShareAlike 4.0 International. Please see License File for more information.


All versions of laravel-querykit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version >=9.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 makeabledk/laravel-querykit contains the following files

Loading the files please wait ....