Download the PHP package prahsys/laravel-supabase without Composer

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

Prahsys Laravel Supabase Integration

A Laravel package for seamless integration with Supabase, providing PostgreSQL-specific features for Laravel applications.

Development

This package can be developed locally within a Laravel application. The main project includes tooling to easily switch between local development and remote package installations.

Working with Local Package Development

To switch between developing locally and using the published package:

  1. Use local development version:

  2. Use remote published version:

The local development mode creates a symlink to the package in the packages/ directory, allowing you to make changes directly to the package code while testing in your application.

Features

Supabase Database Driver

The package registers a dedicated supabase database driver that you can use in your Laravel database configuration. This driver extends the default PostgreSQL driver with automatic handling of UUID columns in:

The driver works in two ways:

  1. It automatically detects common UUID column patterns (like 'id', '*_id', etc.)
  2. It works with the CastsUuidColumns trait to allow explicit UUID column definition

UUID Handling in Supabase

When working with UUIDs in Supabase, comparing a UUID column with a string value requires explicit casting. This is especially important because Supabase doesn't allow creating global implicit casts or custom operators that would normally solve this issue in a standard PostgreSQL installation.

With the Supabase driver, these casts are applied automatically, so you can write normal Laravel queries:

Explicit UUID Column Definition

For more precise control, you can use the CastsUuidColumns trait to explicitly define UUID columns in your models:

The trait:

  1. Automatically includes the primary key as a UUID column
  2. Adds any columns specified in the $uuidColumns property
  3. Communicates this information to the query builder for proper UUID handling

Custom UUID Column Detection

For advanced use cases, you can also register a custom UUID column detector function:

This allows for full customization of UUID column detection beyond the built-in naming conventions.

Installation

Database Configuration

You can use the custom supabase driver in your config/database.php:

The supabase driver is a PostgreSQL driver with additional configurations optimized for Supabase, so you can use it just like the standard pgsql driver.

Development and Testing

Running Tests

To run the tests:

This will run all tests using SQLite in-memory database for speed.

Testing with a Real Supabase Connection

To test with a real Supabase database:

  1. Edit the .env.testing file with your Supabase credentials
  2. Run the special test command:

This is useful for verifying PostgreSQL functionality in an actual database environment.

Compatibility

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-supabase with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^12.0
illuminate/support Version ^12.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 prahsys/laravel-supabase contains the following files

Loading the files please wait ...