Download the PHP package sereny/postgrest without Composer

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

Sereny/PostgREST

Build Status Code Coverage Total Downloads

A PostgREST connection driver for Laravel Eloquent. It lets your Eloquent models perform queries against a PostgREST server over HTTP, without a direct PostgreSQL/PDO connection from your app.

Under the hood it translates the Laravel Query Builder into PostgREST HTTP requests:

Requirements

Installation

The service provider is auto-registered via package discovery.

Configuration

1. Add the connection to config/database.php

2. Publish the package config (optional)

The published file (config/postgrest.php) holds client defaults (base_uri, schema, prefix, token, headers, timeouts). Values in the database.php connection entry override these defaults.

3. Environment variables

Usage

Point your models at the PostgREST connection. The simplest way is to make it the application's default connection:

Or set it per model:

The raw Query Builder is also available through the connection:

Stored procedures (aggregates, custom logic) are available through rpc():

Many-to-many relationships use PostgREST resource embedding (instead of SQL joins). Extend the bundled model (or override newBelongsToMany() yourself):

The pivot table must have foreign keys to both related tables (a requirement of PostgREST resource embedding). attach/detach/sync write to the pivot table over the same connection.

Three-level relationships (hasManyThrough) use nested embedding:

Feature support

Feature Supported
select / where (=, >, >=, <, <=, !=) ✅
whereIn / whereNotIn ✅
whereNull / whereNotNull ✅
whereBetween ✅
orWhere / nested where() groups ✅
like / ilike (% is translated to *) ✅
orderBy (multiple, asc/desc) ✅
limit / offset / simplePaginate ✅
count() (via Prefer: count=exact) ✅
exists() ✅
insert / insertGetId / update / delete ✅
paginate() (count + slice) ✅
Soft deletes ✅
hasOne / hasMany / belongsTo / morph relations ✅
belongsToMany (via resource embedding) ✅
hasManyThrough (via nested embedding) ✅
sum / avg / min / max ⚠️ via rpc() to a database function (or a view)
groupBy / having / distinct ❌ (not exposed by PostgREST — use a view)
increment / decrement / raw expressions ❌ (not exposed by PostgREST — use computed fields or RPC)
Transactions ❌ (PostgREST runs one transaction per request; no multi-request transactions)
Schema builder / migrations ❌ (run DDL directly on PostgreSQL)
rpc() to call stored procedures ✅

For anything marked ❌ or ⚠️, the idiomatic PostgREST approach is a database view, a function exposed as a route, or resource embedding for related resources.

Testing

License

MIT


All versions of postgrest with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^7.8
illuminate/database Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
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 sereny/postgrest contains the following files

Loading the files please wait ...