PHPackages                             esanj/remote-eloquent - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. esanj/remote-eloquent

ActiveLibrary[HTTP &amp; Networking](/categories/http)

esanj/remote-eloquent
=====================

A Laravel package that extends Eloquent ORM to work with remote APIs (REST and gRPC)

v0.1.2(1mo ago)05MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Jul 9Pushed 8mo agoCompare

[ Source](https://github.com/eSanjDev/ms-package-accounting-remote-eloquent)[ Packagist](https://packagist.org/packages/esanj/remote-eloquent)[ RSS](/packages/esanj-remote-eloquent/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (12)Versions (4)Used By (0)

RemoteEloquent
==============

[](#remoteeloquent)

A Laravel package that extends the Eloquent ORM to seamlessly interact with remote APIs (REST and gRPC) as if they were local databases.

Features
--------

[](#features)

- **REST &amp; gRPC Support:** Use Eloquent models to communicate with remote RESTful or gRPC APIs.
- **Familiar Eloquent Syntax:** Continue using Eloquent's expressive syntax for remote data sources.
- **Easy Integration:** Plug-and-play with Laravel 9, 10, and 11.
- **Extensible &amp; Configurable:** Easily customize endpoints, authentication, and serialization.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel 9.x, 10.x, or 11.x, or 12.x
- guzzlehttp/guzzle ^7.0
- illuminate/support ^9.0|^10.0|^11.0|^12.x

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

[](#installation)

```
composer require esanj/remote-eloquent
```

Configuration
-------------

[](#configuration)

Publish the package configuration (if available):

```
php artisan vendor:publish --provider="Esanj\\RemoteEloquent\\Providers\\RemoteEloquentServiceProvider"
```

Edit the configuration file in `config/remote-eloquent.php` to set your API endpoints, authentication, and other options.

Usage
-----

[](#usage)

### Creating a Remote Model

[](#creating-a-remote-model)

Extend your model from `Esanj\RemoteEloquent\RemoteModel` instead of the default Eloquent Model:

```
use Esanj\RemoteEloquent\RemoteModel;

class UserModel extends RemoteModel
{
     public string $address = '127.0.0.1:50051';

     protected string $clientType = 'grpc';
}
```

### Querying Remote Data

[](#querying-remote-data)

```
// Paginate Users List
$users = UserModel::where('is_active',1)->where('age', '>', 10)->paginate();

// Find a user by ID
$user = UserModel::find(1);
```

🧩 Supported Methods
-------------------

[](#-supported-methods)

`RemoteEloquent` supports commonly used Eloquent query builder methods for interacting with remote gRPC APIs.

MethodDescription`where`Apply a basic “where” condition to the query.`whereIn`Filter results where a column’s value is within a given array of values.`whereBetween`Filter results between two values for a specific column.`find`Retrieve a model by its primary key.`findOrFail`Retrieve a model by its primary key or throw an exception if not found.`get`Execute the query and return all matching records as a collection.`paginate`Retrieve paginated results from the remote API.`count`Retrieve the total number of matching records.`avg`Calculate the average of a given column.`sum`Calculate the sum of a given column.> 🔧 *More Eloquent query methods are planned for future releases.*

License
-------

[](#license)

MIT © Esanj

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~163 days

Total

3

Last Release

34d ago

PHP version history (2 changes)v0.1.0PHP ^8.0

v0.1.2PHP ^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/c908dfdf092a072c4bc678b161b053e20d00f90e9e9ba2c18ecddef6b848f1a4?d=identicon)[esanj](/maintainers/esanj)

---

Top Contributors

[![itsalifadaei](https://avatars.githubusercontent.com/u/34383343?v=4)](https://github.com/itsalifadaei "itsalifadaei (7 commits)")[![mr-mokhtari](https://avatars.githubusercontent.com/u/34773591?v=4)](https://github.com/mr-mokhtari "mr-mokhtari (3 commits)")

---

Tags

apilaravelrestormeloquentgRPCremote

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/esanj-remote-eloquent/health.svg)

```
[![Health](https://phpackages.com/badges/esanj-remote-eloquent/health.svg)](https://phpackages.com/packages/esanj-remote-eloquent)
```

###  Alternatives

[jlevers/selling-partner-api

PHP client for Amazon's Selling Partner API

4335.4M2](/packages/jlevers-selling-partner-api)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[clarifai/clarifai-php-grpc

Clarifai PHP gRPC client

1229.6k](/packages/clarifai-clarifai-php-grpc)[bjerke/api-query-builder

A query builder for Laravel that parses the request and uses Eloquent ORM to query database

267.7k1](/packages/bjerke-api-query-builder)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.1k38](/packages/dreamfactory-df-core)

PHPackages © 2026

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