PHPackages                             nicko170/laravel-influxdb2 - 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. nicko170/laravel-influxdb2

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

nicko170/laravel-influxdb2
==========================

A simple wrapper around `influxdata/influxdb-client-php` to make usage in Laravel easier.

v0.0.1(3y ago)0511[4 PRs](https://github.com/nicko170/laravel-influxdb2/pulls)MITPHPPHP ^8.1

Since Aug 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nicko170/laravel-influxdb2)[ Packagist](https://packagist.org/packages/nicko170/laravel-influxdb2)[ Docs](https://github.com/nicko170/laravel-influxdb2)[ GitHub Sponsors](https://github.com/nicko170)[ RSS](/packages/nicko170-laravel-influxdb2/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (6)Used By (0)

laravel-influxdb2
=================

[](#laravel-influxdb2)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dfc8e5827ff62161b566a408600dfd7435f57d63a54ff6b6be0ff476106d68ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636b6f3137302f6c61726176656c2d696e666c75786462322e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nicko170/laravel-influxdb2)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4e21dbc9d72b4c59b0f614d06471a9888f92d32fc663be53d0e5c58ef766cceb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e69636b6f3137302f6c61726176656c2d696e666c75786462322f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/nicko170/laravel-influxdb2/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4f7de3d2bdcbeb480ae8cc312fa5bbc2582912af93edfa9638a603ef24190371/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e69636b6f3137302f6c61726176656c2d696e666c75786462322f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/nicko170/laravel-influxdb2/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f956aa6fea9eebcc196584600eb2b0921f7ae44d40da041c50bb7dae8a5fcba1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e69636b6f3137302f6c61726176656c2d696e666c75786462322e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nicko170/laravel-influxdb2)

A simple wrapper around `influxdata/influxdb-client-php` to make usage in Laravel easier.

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

[](#installation)

You can install the package via composer:

```
composer require nicko170/laravel-influxdb2
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-influxdb2-config"
```

This is the contents of the published config file:

```
return [
    'url' => env('INFLUXDB_URL', 'http://localhost:8086'),
    'token' => env('INFLUXDB_TOKEN'),
    'bucket' => env('INFLUXDB_BUCKET'),
    'org' => env('INFLUXDB_ORG'),
    'precision' => \InfluxDB2\Model\WritePrecision::S
];
```

Usage
-----

[](#usage)

Add your InfluxDB connection to your `.env` file:

```
INFLUXDB_URL=https://ap-southeast-2-1.aws.cloud2.influxdata.com
INFLUXDB_TOKEN=XXX
INFLUXDB_BUCKET=YYY
INFLUXDB_ORG=ZZZ
```

Create a new class instance, and use it to write data:

```
$influxdb = new \Nicko170\InfluxDB2\InfluxDB2()
$writer = $influxdb->createWriteApi();
$writer->write(new \InfluxDB2\Point('cpu_load', ['host' => 'serverA'], ['value' => 0.64]));
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/nicko170/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Nick Pratley](https://github.com/nicko170)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6886ef143ccc130ceee1634b6ddf3ab94ae57436b9dbc1b3cde75a983883c217?d=identicon)[nicko170](/maintainers/nicko170)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![nicko170](https://avatars.githubusercontent.com/u/9477420?v=4)](https://github.com/nicko170 "nicko170 (6 commits)")

---

Tags

influxinfluxdbinfluxdb-php-clientinfluxdb2laravellaravel-packagelaravelnicko170laravel-influxdb2

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/nicko170-laravel-influxdb2/health.svg)

```
[![Health](https://phpackages.com/badges/nicko170-laravel-influxdb2/health.svg)](https://phpackages.com/packages/nicko170-laravel-influxdb2)
```

###  Alternatives

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spatie/laravel-model-flags

Add flags to Eloquent models

4301.1M1](/packages/spatie-laravel-model-flags)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[spatie/laravel-sql-commenter

Add comments to SQL queries made by Laravel

1931.4M1](/packages/spatie-laravel-sql-commenter)[spatie/laravel-deleted-models

Automatically copy deleted records to a separate table

409109.8k4](/packages/spatie-laravel-deleted-models)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

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