PHPackages                             hyperized/hostfact - 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. [API Development](/categories/api)
4. /
5. hyperized/hostfact

ActiveLibrary[API Development](/categories/api)

hyperized/hostfact
==================

Hostfact 3.0 API Implementation for Laravel

v4.0.0(3y ago)166.8k15[1 PRs](https://github.com/hyperized/hostfact/pulls)MITPHPPHP ^8.1CI passing

Since Jun 9Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/hyperized/hostfact)[ Packagist](https://packagist.org/packages/hyperized/hostfact)[ RSS](/packages/hyperized-hostfact/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (24)Used By (0)

Hostfact API 3.0 for Laravel
============================

[](#hostfact-api-30-for-laravel)

[![FOSSA Status](https://camo.githubusercontent.com/d7f0a7f91e499da879daa9e97ddecfc0eef5132723e1ba53345688aae3e41707/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466879706572697a6564253246686f7374666163742e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2Fhyperized%2Fhostfact?ref=badge_shield)

Official documentation:
-----------------------

[](#official-documentation)

- [Hostfact API documentation](https://www.hostfact.nl/developer/api/)

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

[](#installation)

Install using composer:

```
composer require hyperized/hostfact
```

This package supports Package Auto-Discovery (Laravel 5.5+) so it doesn't require you to manually add the ServiceProvider and alias.

If you are using a lower version of Laravel or not using Auto-Discovery you can add the Hostfact Service Provider to the `config/app.php` file

```
Hyperized\Hostfact\HostfactServiceProvider::class,
```

Register an alias for Hostfact, also in `config/app.php`:

```
'Hostfact'    => Hyperized\Hostfact\HostfactServiceProvider::class,
```

Now publish the Hostfact package into your installation:

```
php artisan vendor:publish --provider="Hyperized\Hostfact\HostfactServiceProvider" --tag="config"
```

This should give you a message like: `Copied File [/vendor/hyperized/hostfact/config/Hostfact.php] To [/config/Hostfact.php]`

It's possible to edit your configuration variables in the `config/Hostfact.php` file or you can use the `HOSTFACT_URL`and `HOSTFACT_KEY` environment variables to store sensitive information in the `.env` file

```
// config/Hostfact.php
'api_v2_url'		=> env('HOSTFACT_URL', 'https://yoursite.tld/Pro/apiv2/api.php'),
'api_v2_key'		=> env('HOSTFACT_KEY', 'token'),
'api_v2_timeout'	=> env('HOSTFACT_TIMEOUT', 20),

// .env/.env.example
HOSTFACT_URL=https://yoursite.tld/Pro/apiv2/api.php
HOSTFACT_KEY=token
HOSTFACT_TIMEOUT=20
```

Functionality
-------------

[](#functionality)

When writing code for this Hostfact package, consider that this package has been written as a basic interface.

This package *will* do the following:

- Provide an easy way to communicate with Hostfact API controllers;
- Document the available API controller endpoints with methods;
- Transport layer (HTTP/HTTPS) error catching;
- Basic error parsing;

This package *will not*:

- Parameter / input validation;
- Output validation;

You will need to consult the [Hostfact API documentation](https://www.hostfact.nl/developer/api/) to understand the acceptable input and output for each of the API controllers.

Examples
--------

[](#examples)

Example code:

```
use \Hyperized\Hostfact\Api\Controllers\Product;

$products = Product::new()
                ->list([
                    'searchfor' => 'invoice'
                ]);
```

License
-------

[](#license)

[![FOSSA Status](https://camo.githubusercontent.com/bd36ecd90cd9e5a88788ecbe6069464187a70f7998f50c06c3b4b676938723cc/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466879706572697a6564253246686f7374666163742e7376673f747970653d6c61726765)](https://app.fossa.io/projects/git%2Bgithub.com%2Fhyperized%2Fhostfact?ref=badge_large)

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~197 days

Total

20

Last Release

1259d ago

Major Versions

v2.9.2 → v3.0.02021-11-28

v3.0.2 → v4.0.02022-12-06

PHP version history (6 changes)v2.2PHP &gt;=5.3.0

v2.7.0PHP &gt;=5.6.4

v2.8.0PHP &gt;=7.1

v2.9.0PHP ^7.2.5

v3.0.0PHP ^7.4|^8.0|^8.1

v4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c854d21c83b5addf5f6c607968a353ff859d5bf8302659774d71b017f2f20d6?d=identicon)[hyperized](/maintainers/hyperized)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (249 commits)")[![mergify[bot]](https://avatars.githubusercontent.com/in/10562?v=4)](https://github.com/mergify[bot] "mergify[bot] (238 commits)")[![hyperized](https://avatars.githubusercontent.com/u/827954?v=4)](https://github.com/hyperized "hyperized (49 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (4 commits)")[![bitency](https://avatars.githubusercontent.com/u/18144539?v=4)](https://github.com/bitency "bitency (3 commits)")[![Caroga](https://avatars.githubusercontent.com/u/4005934?v=4)](https://github.com/Caroga "Caroga (3 commits)")[![nickurt](https://avatars.githubusercontent.com/u/5840084?v=4)](https://github.com/nickurt "nickurt (3 commits)")[![dvdheiden](https://avatars.githubusercontent.com/u/90568118?v=4)](https://github.com/dvdheiden "dvdheiden (2 commits)")[![casdr](https://avatars.githubusercontent.com/u/7041290?v=4)](https://github.com/casdr "casdr (2 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")[![chrisriteco](https://avatars.githubusercontent.com/u/1726119?v=4)](https://github.com/chrisriteco "chrisriteco (1 commits)")[![JensMombaerts](https://avatars.githubusercontent.com/u/3781236?v=4)](https://github.com/JensMombaerts "JensMombaerts (1 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (1 commits)")

---

Tags

hostfacthostfact-apiphpapihostfacthyperized

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hyperized-hostfact/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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