PHPackages                             rikodev/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rikodev/laravel-influxdb2

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rikodev/laravel-influxdb2
=========================

A service made to provide, set up and use the library from influxdata/influxdb-client-php in Laravel.

v1.0.1(3mo ago)350MITPHP

Since Mar 13Pushed 3mo agoCompare

[ Source](https://github.com/RikoDEV/laravel-influxdb2)[ Packagist](https://packagist.org/packages/rikodev/laravel-influxdb2)[ RSS](/packages/rikodev-laravel-influxdb2/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

[![influx-laravel](https://private-user-images.githubusercontent.com/18230443/240657419-8d9eb202-9050-4b76-878b-79b863629f48.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMzc0NTgsIm5iZiI6MTc4MjEzNzE1OCwicGF0aCI6Ii8xODIzMDQ0My8yNDA2NTc0MTktOGQ5ZWIyMDItOTA1MC00Yjc2LTg3OGItNzliODYzNjI5ZjQ4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjIyVDE0MDU1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwZDhlNzE3YWNiOGRhYzJkYzI5MGU1MmM3MTA1MmQ1ZWFjYzdlNTI4MGZmMDJiOGIzNjgyMWNlYTBlZjYyMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRmpwZWcifQ.yu9zmNan8Uz9X0YX_Znb_IBJuVb9a7AIBfkdopRVelw)](https://private-user-images.githubusercontent.com/18230443/240657419-8d9eb202-9050-4b76-878b-79b863629f48.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMzc0NTgsIm5iZiI6MTc4MjEzNzE1OCwicGF0aCI6Ii8xODIzMDQ0My8yNDA2NTc0MTktOGQ5ZWIyMDItOTA1MC00Yjc2LTg3OGItNzliODYzNjI5ZjQ4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjIyVDE0MDU1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwZDhlNzE3YWNiOGRhYzJkYzI5MGU1MmM3MTA1MmQ1ZWFjYzdlNTI4MGZmMDJiOGIzNjgyMWNlYTBlZjYyMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRmpwZWcifQ.yu9zmNan8Uz9X0YX_Znb_IBJuVb9a7AIBfkdopRVelw)

Laravel InfluxDB 2
==================

[](#laravel-influxdb-2)

A Laravel package to integrate [InfluxDB 2.0](https://www.influxdata.com/) using the official [influxdb-client-php](https://github.com/influxdata/influxdb-client-php) library.

📦 Installation
--------------

[](#-installation)

### 1. **Install with Composer:**

[](#1-install-with-composer)

```
composer require rikodev/laravel-influxdb2
```

### 2. **Register Service Provider (if needed):**

[](#2-register-service-provider-if-needed)

> **Note:** Laravel 5.5+ supports automatic package discovery. You can skip this step.

For older versions, add the provider and alias to your `config/app.php`:

```
'providers' => [
    RikoDEV\InfluxDB\Providers\ServiceProvider::class,
],

'aliases' => [
    'InfluxDB' => RikoDEV\InfluxDB\Facades\InfluxDB::class,
],
```

### 3. **Environment Configuration:**

[](#3-environment-configuration)

Add the following environment variables to your `.env` file:

```
INFLUXDB_HOST=localhost
INFLUXDB_PORT=8086
INFLUXDB_TOKEN=
INFLUXDB_BUCKET=
INFLUXDB_ORG=
```

### 4. **Publish Configuration:**

[](#4-publish-configuration)

Run the following command to publish the configuration file:

```
php artisan vendor:publish --provider="RikoDEV\InfluxDB\Providers\ServiceProvider"
```

---

📖 Usage
-------

[](#-usage)

### 🔍 Reading Data

[](#-reading-data)

```
use RikoDEV\InfluxDB\Facades\InfluxDB;

// Get the query client
$queryApi = InfluxDB::createQueryApi();

// Query data
$result = $queryApi->queryRaw(
    "from(bucket: \"my-bucket\")
    |> range(start: 0)
    |> filter(fn: (r) => r[\"_measurement\"] == \"weather\"
                         and r[\"_field\"] == \"temperature\"
                         and r[\"location\"] == \"Sydney\")"
);

InfluxDB::close();
```

### ✏️ Writing Data

[](#️-writing-data)

```
use RikoDEV\InfluxDB\Facades\InfluxDB;
use InfluxDB2\Point;

// Get the write client
$writeApi = InfluxDB::createWriteApi();

// Create an array of points and write them to InfluxDB
$result = $writeApi->write([
    Point::measurement("blog_posts")
         ->addTag("post_id", $post->id)
         ->addField("likes", 6)
         ->addField("comments", 3)
         ->time(time())
]);

InfluxDB::close();
```

---

📜 License
---------

[](#-license)

This project is licensed under the [MIT License](LICENSE). Based on the [tray-labs/laravel-influxdb](https://github.com/tray-labs/laravel-influxdb) project.

---

Feel free to open an issue or submit a PR if you’d like to improve the project!

🚀 Happy coding!

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

2

Last Release

91d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18230443?v=4)[Jacek Maciejak](/maintainers/RikoDEV)[@RikoDEV](https://github.com/RikoDEV)

---

Top Contributors

[![RikoDEV](https://avatars.githubusercontent.com/u/18230443?v=4)](https://github.com/RikoDEV "RikoDEV (18 commits)")[![dsandrade](https://avatars.githubusercontent.com/u/26100880?v=4)](https://github.com/dsandrade "dsandrade (18 commits)")[![tray-labs](https://avatars.githubusercontent.com/u/29306337?v=4)](https://github.com/tray-labs "tray-labs (15 commits)")[![1giba](https://avatars.githubusercontent.com/u/4941544?v=4)](https://github.com/1giba "1giba (5 commits)")[![KuenzelIT](https://avatars.githubusercontent.com/u/4572444?v=4)](https://github.com/KuenzelIT "KuenzelIT (2 commits)")[![tobias-kuendig](https://avatars.githubusercontent.com/u/8600029?v=4)](https://github.com/tobias-kuendig "tobias-kuendig (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![swilla](https://avatars.githubusercontent.com/u/304159?v=4)](https://github.com/swilla "swilla (1 commits)")[![edbizarro](https://avatars.githubusercontent.com/u/84926?v=4)](https://github.com/edbizarro "edbizarro (1 commits)")

---

Tags

influxdbinfluxdb2influxdb3laravel

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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