PHPackages                             andrewlamers/eloquent-rest-bridge - 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. [Database &amp; ORM](/categories/database)
4. /
5. andrewlamers/eloquent-rest-bridge

ActiveLibrary[Database &amp; ORM](/categories/database)

andrewlamers/eloquent-rest-bridge
=================================

A connection driver for eloquent that forwards sql statements over HTTP and returns the data back into an eloquent model.

v0.1.5(8y ago)0249[1 issues](https://github.com/andrewlamers/eloquent-rest-bridge/issues)MITPHP

Since Nov 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/andrewlamers/eloquent-rest-bridge)[ Packagist](https://packagist.org/packages/andrewlamers/eloquent-rest-bridge)[ RSS](/packages/andrewlamers-eloquent-rest-bridge/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (9)Versions (7)Used By (0)

Eloquent Rest Bridge
====================

[](#eloquent-rest-bridge)

A connection driver for the illuminate database manager that forwards sql statements over http to a service running on the target host machine.

This significantly reduces the transfer size of traditional connections made over a tcp connection.

The host machine will execute the sql statements and return the results back in json format that gets parsed back into the database manager as if it was a direct database connection.

SSL is supported but not required as all request and response bodies are encrypted by AES with a pre-shared key.

This is only really useful for retrieving results through a limited bandwidth connection, or through firewalls. The reduced transfer size allows response times to be much quicker than tunneling raw database commands through a port over SSH.

Installation
------------

[](#installation)

```
composer require andrewlamers/eloquent-rest-bridge

```

### Laravel Service Provider

[](#laravel-service-provider)

Include this in your config/app.php list of service providers.

```
Andrewlamers\EloquentRestBridge\ServiceProvider::class

```

### Laravel configuration file

[](#laravel-configuration-file)

There is an included configuration file for laravel that allows you to modify configuration of the rest bridge.

To move the configuration file to your projects config/ folder use the following command.

```
php artisan vendor:publish --provider="Andrewlamers\EloquentRestBridge\ServiceProvider"

```

### Configuration Options

[](#configuration-options)

```
return array(
    'encryption' => [

        /*
         * Available ciphers are AES-256-CBC and AES-128-CBC
         */
        'cipher' => env('REST_BRIDGE_CIPHER', 'AES-256-CBC'),

        /*
         * The key must match the cipher. AES-256 must be a 32 bit key, and AES-128 must be a 16 byte key
         * You can use the php artisan key:generate --show command to generate a key. Do not use the same key as your application.
         * The encrypter will look for the key in the environment value with the key name specified here.
        */
        'key'    => 'REST_BRIDGE_KEY'
    ],
    /*
     * The url that is listening for sql commands to return results from.
     */
    'url'        => env('REST_BRIDGE_URL'),
    'log' => [
        /*
        * Enable logging of requests, responses, and sql commands.
        */
        'enabled' => false,
        /*
         * Base path for the log files. It will create 3 log files for requests, responses, and sql queries.
         */
        'base_path' => storage_path('logs/')
    ],
    'daemon' => [
        'enabled' => false,
        'route' => '_rest_bridge/handler'
    ]
);

```

### Example database configuration

[](#example-database-configuration)

In your database configuration the 'rest' driver will be available. It needs to know the connection you want to use.

```
'my-db-connection' => [
    'driver'   => 'sqlsrv',
    'host'     => env('SQLSRV_HOST', ''),
    'database' => env('SQLSRV_DATABASE', ''),
    'username' => env('SQLSRV_USERNAME', ''),
    'password' => env('SQLSRV_PASSWORD', ''),
    'charset'  => 'utf8',
    'prefix'   => '',
],
'my-rest-connection' => [
    'driver' => 'rest',
    'connection' => 'my-db-connection'
]

```

The rest driver will forward the configuration options to the daemon listening for commands.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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 ~39 days

Recently: every ~48 days

Total

6

Last Release

2953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7feecaccfbdc20e9a5a9bccbd0394ff923e7490956817b90cc4614df0a48481a?d=identicon)[emaw](/maintainers/emaw)

---

Top Contributors

[![andrewlamers](https://avatars.githubusercontent.com/u/319577?v=4)](https://github.com/andrewlamers "andrewlamers (11 commits)")

### Embed Badge

![Health badge](/badges/andrewlamers-eloquent-rest-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/andrewlamers-eloquent-rest-bridge/health.svg)](https://phpackages.com/packages/andrewlamers-eloquent-rest-bridge)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9772.3M123](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76922.3M129](/packages/laravel-mcp)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.8k](/packages/larastan-larastan)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[illuminate/queue

The Illuminate Queue package.

21332.6M1.5k](/packages/illuminate-queue)

PHPackages © 2026

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