PHPackages                             supabase-php/supabase-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. supabase-php/supabase-client

ActiveLibrary[API Development](/categories/api)

supabase-php/supabase-client
============================

Supabase client for PHP.

v1.2.0(6mo ago)92.1kMITPHPPHP ^8.2.0CI passing

Since Sep 8Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/CodeWithSushil/supabase-client)[ Packagist](https://packagist.org/packages/supabase-php/supabase-client)[ Fund](https://opencollective.com/CodeWithSushil)[ RSS](/packages/supabase-php-supabase-client/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

[![Supabase](https://camo.githubusercontent.com/4b1893e25d1ac65984f3225b340c608a148735922932363c407e9377f600cd1b/68747470733a2f2f6765746c6f676f2e6e65742f77702d636f6e74656e742f75706c6f6164732f323032302f31312f73757061626173652d6c6f676f2d766563746f722e706e67)](https://camo.githubusercontent.com/4b1893e25d1ac65984f3225b340c608a148735922932363c407e9377f600cd1b/68747470733a2f2f6765746c6f676f2e6e65742f77702d636f6e74656e742f75706c6f6164732f323032302f31312f73757061626173652d6c6f676f2d766563746f722e706e67)

[![Packagist Downloads](https://camo.githubusercontent.com/99b3ff9a75bf7cbebf99e6c03eaf5e335ed543f6dd5a3bcce01b33b37356e22b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73757061626173652d7068702f73757061626173652d636c69656e743f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572)](https://camo.githubusercontent.com/99b3ff9a75bf7cbebf99e6c03eaf5e335ed543f6dd5a3bcce01b33b37356e22b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73757061626173652d7068702f73757061626173652d636c69656e743f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572)[![GitHub Release](https://camo.githubusercontent.com/9dcb10523218663b8ddc2c2c04181540b894af3719e2fdb80ac0d075b2311241/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4173686973686b756d6268617230312f73757061626173652d7068703f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/9dcb10523218663b8ddc2c2c04181540b894af3719e2fdb80ac0d075b2311241/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4173686973686b756d6268617230312f73757061626173652d7068703f7374796c653d666f722d7468652d6261646765)[![GitHub License](https://camo.githubusercontent.com/7a15fdf28859994e27f36adcfa3a6a5e7119906567d482060a2875a059eaf032/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4173686973686b756d6268617230312f73757061626173652d7068703f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/7a15fdf28859994e27f36adcfa3a6a5e7119906567d482060a2875a059eaf032/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4173686973686b756d6268617230312f73757061626173652d7068703f7374796c653d666f722d7468652d6261646765)[![Packagist Dependency Version](https://camo.githubusercontent.com/9c02ed8e1f5a459077ce4603bdda9f8cfe9e75b7fdbc826a3564c1f92ef11eed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73757061626173652d7068702f73757061626173652d636c69656e742f7068703f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/9c02ed8e1f5a459077ce4603bdda9f8cfe9e75b7fdbc826a3564c1f92ef11eed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73757061626173652d7068702f73757061626173652d636c69656e742f7068703f7374796c653d666f722d7468652d6261646765)

Supabase client for PHP:

- Realtime database, Storage, Authentication and many more.
- When you creating your supabase table, make sure RLS (Row Level Security) option be disable.
- If RLS are enable maybe you getting some errors.

---

Warning

if you push the code to production while Row-Level Security (RLS) is disabled, it can pose a security threat to your application. To secure your app, please enable Row-Level Security. Otherwise, write an Object-Oriented PDO connection with PostgreSQL.

> ### Env config code:
>
> [](#env-config-code)
>
> ```
> HOST=aws-o-ap-south-pool.supabase.com
> PORT=6543
> USERNAME=postgres.grufgrcytvrh
> PASSWORD=[Your Password]
> DATABASE=postgres
> ```

---

### `Install`

[](#install)

- Install Supabase client for our project.
- Than we are require supabase-client by composer.

```
composer require supabase-php/supabase-client      # letest
# OR Downloads old version
composer require supabase-php/supabase-client:"1.0.4"
```

---

### Config

[](#config)

Supabase client for PHP configuration with your php project/web Apps.

```
use Supabase\Functions as Supabase;

// autoload the supabase class
require_once('vendor/autoload.php');

// config
$config = [
  'url' => $_ENV['SB_URL'],
  # 'apikey' => $_ENV['SB_APIKEY'],
  'service_role' => $_ENV['SB_SERVICE_ROLE'] # If don't want disable RLS
];

$client = new Supabase($config['url'], $config['apikey']);
```

if you did not have `.env` file so please create your `.env` file.

```
touch .env
```

if you create already your `.env` file then you will be derclare your enviroment variables names.

```
vi .env
```

```
SB_URL=https://rurtighghurtuhouger.supabase.co
SB_API_KEY=utertu895tyut8trrvt8rtu8mutt84r548t894v98v5vtt6ut54uu85tu
```

---

### `getAllData()`

[](#getalldata)

if you want to get all recorded data from your table when you saved the data then used `getAllData` function.

```
$data = $client->getAllData('table name');
print_r($data);
```

---

### `getSingleData()`

[](#getsingledata)

if you need a specifics data from specifics columns then you used `getSingleData` function.

```
$data = $client->getSingleData('table name', 'column name');
print_r($data);
```

---

### `postData()`

[](#postdata)

if you want to save your data to your table then used `postData` function.

```
// posted data
$data = [
  'name' => 'PHP',
  'version' => '8.3'
];

$client->postData('table name', $data, 'id');
// 3rd option on_conflict
```

---

### `updateData()`

[](#updatedata)

if you thinks something to be wrong or outdated so you will be changing that particular value from particular columns and also you updating all the data. Then used `updateData` function.

```
// updated data
$data = [
  'name' => 'PHP',
  'version' => '8.4'
];

$client->updateData('table name', 'id number', $data);
```

---

### `deleteData()`

[](#deletedata)

if you want to Delete a specificed data from the table, then used `deleteData` function. you needed the id number of table data.

```
$client->deleteData('table name', 2 //id);
```

---

### `Pagination()`

[](#pagination)

```
$client->pages('table name');
```

---

### `Filtering()`

[](#filtering)

```
$client->filter('table name', 1);

```

---

### `Matching()`

[](#matching)

```
$data = [
  'name' => 'PHP',
  'version' => '8.4'
];

$client->matchs('table name', $data);
```

---

### Contributors

[](#contributors)

[ ![](https://camo.githubusercontent.com/41b99ff64f1f7c420fa29683cf5ca5d6ef75b344a867d98b684fc99baf202578/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d4173686973686b756d6268617230312f73757061626173652d706870)](https://github.com/Ashishkumbhar01/supabase-php/graphs/contributors)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~47 days

Total

14

Last Release

191d ago

Major Versions

1.x-dev → 2.x-dev2025-12-25

PHP version history (4 changes)1.0.3PHP ^7.0||^8.3

1.0.4PHP ^7.0||^8.0

1.0.7PHP ^8.2

v1.1.3PHP ^8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/14ee8bc204856d2c784a628778d5ae25e5ef14052cce198ca3a7943574832260?d=identicon)[CodeWithSushil](/maintainers/CodeWithSushil)

---

Top Contributors

[![CodeWithSushil](https://avatars.githubusercontent.com/u/94827178?v=4)](https://github.com/CodeWithSushil "CodeWithSushil (3 commits)")

---

Tags

phpsupabasesupabase-authsupabase-clientsupabase-phpsupabase-realtimesupabase-storagesupabasesupabase-phpsupabase-clientsupabase-sdk

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/supabase-php-supabase-client/health.svg)

```
[![Health](https://phpackages.com/badges/supabase-php-supabase-client/health.svg)](https://phpackages.com/packages/supabase-php-supabase-client)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[showdoc/showdoc

ShowDoc is a tool greatly applicable for an IT team to share documents online

12.8k7.1k](/packages/showdoc-showdoc)[netflie/whatsapp-cloud-api

The first PHP SDK to send and receive messages using a cloud-hosted version of the WhatsApp Business Platform

668535.6k5](/packages/netflie-whatsapp-cloud-api)[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36208.3k3](/packages/wrav-oembed)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.7k1](/packages/jasara-php-amzn-selling-partner-api)[hardcastle/xrpl_php

PHP SDK / Client for the XRP Ledger

1110.7k7](/packages/hardcastle-xrpl-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
