supabase/postgrest-php

Supabase PostgREST client for PHP
13,225 1
Install
composer require supabase/postgrest-php
Latest Version:v0.0.4
Last Updated:May 20, 2026
Links: GitHub  ·  Packagist
Maintainer: silentworks

Supabase postgrest-php

PHP Client library to interact with Supabase Postgrest.

Note: This repository is in Alpha and is not ready for production usage. API's will change as it progresses to initial release.

TODO

  • Support for PHP 7.4
  • Remove $this->fetch option - not relevant in this lib
  • Running unit and integration tests together results in test failures

Quick Start Guide

Installing the module

composer require supabase/postgrest-php

Connecting to the postgrest backend


use Supabase\Postgrest\PostgrestClient;

$client = new PostgrestClient($reference_id, $api_key, $opts);

Examples

Examples directory

Testing

Setup the testing Env

cp .env.example tests/.env
For the REFERENCE_ID

Once signed on to the dashboard, navigate to, Project >> Project Settings >> General settings. Copy the Reference ID for use in the .env.

For the API_KEY

Once signed on to the dashboard, navigate to, Project >> Project Settings >> API >> Project API keys. Choose either the anon public or the service_role key.

Populate the tests/.env to include REFERENCE_ID and API_KEY.

Running all tests
vendor/bin/phpunit

Related Packages

quix-labs/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage

12,574 16
iclimber/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage

1,397 0
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

637,827,751 9,703
laravel/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

498,216,183 7,442

Version History

Version Released License
v0.0.4
v0.0.3
v0.0.2
v0.0.1