Download the PHP package claver/smart-query without Composer

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

Laravel Smart Query

Introduction

Smart-Query is a Laravel package that utilizes spatie-query-builder to enable smart queries with minimal configuration. With this package, you can create powerful, dynamic queries by simply adding the HasSmartQuery trait to your models.

Installation

To install Smart-Query, you need to have a Laravel application set up. Then, you can install the package via composer by running the command:

After installing the package, you need to register the SmartQueryServiceProvider in your config > app.php

This will publish the query-builder.php file to your config directory.

Usage

To use Smart-Query, add the HasSmartQuery trait to any model you want to enable smart queries on.

This trait provides a resolve method, which you can use to apply smart queries to your model.

The smartQuery method will apply any filters, sorts, includes, and fields specified in the query string to the model.

To learn more about how to make simple and advanced queries, visit Spatie-Query-Builder

You do not have to create your own query builder every single time you need it. Just override these methods.

Method Description
getAllowedFilters Returns an array that includes all the fields that could be filtered
getAllowedIncludes Returns an array that includes all the relationships that could be included
getAllowedSorts Returns an array that includes all the fields that could be sorted. you don't need to include this method because it's dynamically generated

Conclusion

Smart-Query is a powerful package that simplifies creating dynamic queries in Laravel. By using the HasSmartQuery trait, you can take advantage of the spatie-query-builder package and create smart queries with minimal configuration.


All versions of smart-query with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
spatie/laravel-query-builder Version ^5.2
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 claver/smart-query contains the following files

Loading the files please wait ....