Download the PHP package jiaxincui/repository without Composer

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

About

适用于 Laravel 的 Repository 包

提供Criteria以及请求参数查询

安装

部分示例

请求参数查询

提供了一个默认的 Criteria,它可以解析请求字符串并生成查询。

所有的查询字段需要在设置为白名单的情况下才会生效,所以你不用担心数据的安全。

请求示例:

/api/user?where=name:liming

/api/user?where=age:>:18

使用

使用where作为请求参数的健,可使用;分割多个条件,约束为OR查询。

/api/user?where=name:like:ming;name:=:zhangsan

要使用 AND 约束查询,需要提供一个where数组。

/api/user?where[]=name:like:liming&wehre[]=age:>:18

可以使用的查询有where,whereIn,whereNotIn,whereNull, 'whereNotNull', 'whereBetween'

下表列出了如何使用方法和示例

字符 方法 说明 示例
in whereIn() 数组元素使用,分割 /api/user?where=name:in:zhang,li,wang
notin whereNotIn() 数组元素使用,分割 /api/user?where=name:notin:zhang,li,wang
null whereNull() /api/user?where=name:null
notnull whereNotNull() /api/user?where=name:notnull
between whereBetween() 数组元素使用,分割 /api/user?where=age:between:18,23
notbetween whereNotBetween() 数组元素使用,分割 /api/user?where=age:notbetween:18,23
like where() 作为第二个参数传入 /api/user?where=name:like:zhang
<>= where() 作为第二个参数传入 /api/user?where=age:>:18

同时还可以使用whereHas()方法,如:

查询角色名称为 admin 的用户。

/api/user?where=role.name:=:admin

排序

使用orderBy作为请求参数的键

如: /api/user?where=age:>:18&orderBy=user_id,desc

限制结果集

使用slice作为请求参数的键

从第2条开始取5条数据

/api/user?where=age:>:18&slice=2,5

关联查询

使用with作为请求参数的键

使用 , 分割多个关联

/api/user?where=age:>:18&with=role,book

软删除

使用 trashed 作为请求参数的键,可以应用软删除作用域 如:

仅列出已经软删除的项目

/api/user?trashed=only

包含软删除项目

/api/user?trashed=with

更多示例正在准备中...

License

MIT © JiaxinCui


All versions of repository with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/config Version ~5.0|~6.0|~7.0|~8.0
illuminate/console Version ~5.0|~6.0|~7.0|~8.0
illuminate/database Version ~5.0|~6.0|~7.0|~8.0
illuminate/filesystem Version ~5.0|~6.0|~7.0|~8.0
illuminate/http Version ~5.0|~6.0|~7.0|~8.0
illuminate/support Version ~5.0|~6.0|~7.0|~8.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 jiaxincui/repository contains the following files

Loading the files please wait ....