PHPackages                             phalouvas/httpquery - 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. phalouvas/httpquery

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

phalouvas/httpquery
===================

Laravel Http driver for eloquent.

02PHP

Since Oct 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/phalouvas/httpquery)[ Packagist](https://packagist.org/packages/phalouvas/httpquery)[ RSS](/packages/phalouvas-httpquery/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Http Driver
===================

[](#laravel-http-driver)

The library allows to create and assign an API connection to Laravel 8 Eloquent models and use Laravel query builder to build a query string and get data as if you get data from a database connection. It also allows to use Eloquent relationships.

Once developers define the configuration of a new API connection and make the related model classes use that connection, they don't need to think about API calls, authentication, etc. They just work with those models as if they are regular models that have a MySQL connection. However, the library only supports retrieving data from an API service.

The package must be installed both on the source and destination Laravel instance.

Installation &amp; Configuration
================================

[](#installation--configuration)

To install `composer require phalouvas/httpquery`

If not autoloaded (e.g. in Lumen) add line: `$app->register(\phalouvas\Httpquery\ServiceProvider::class);`before `$app->withEloquent();`

In file `config\database.php` add below entry in connections and setup accordingly. Below is an example

```
'connections' => [
  ...
  'http_msms' => [
        'driver' => 'httpquery',
        'database' => env('APP_MSMS_URL', 'https://api.sms.to/'),
        'port' => env('APP_MSMS_PORT', ''),
        'api_key' => env('APP_MSMS_API_KEY', 'api_key'),
        'connection' => env('APP_MSMS_CONNECTION', 'mysql'),
    ],
],

```

In order to accept routes. Add in your route file below entry: `Route::post('/query', '\phalouvas\Httpquery\QueryController@query');`

In your model add: `protected $connection = 'http_msms';`

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/296e7fc861e11d6d45694348cbeacdb0dfbd387a1726a287cf59442a46185acf?d=identicon)[phalouvas](/maintainers/phalouvas)

---

Top Contributors

[![phalouvas](https://avatars.githubusercontent.com/u/5654203?v=4)](https://github.com/phalouvas "phalouvas (8 commits)")

### Embed Badge

![Health badge](/badges/phalouvas-httpquery/health.svg)

```
[![Health](https://phpackages.com/badges/phalouvas-httpquery/health.svg)](https://phpackages.com/packages/phalouvas-httpquery)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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