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 3w 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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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