| Package Data | |
|---|---|
| Maintainer Username: | tray-labs | 
| Maintainer Contact: | dev@traylabs.com.br (Tray Labs) | 
| Package Create Date: | 2017-06-09 | 
| Package Last Update: | 2025-06-16 | 
| Home Page: | |
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-10-27 03:15:56 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 152,845 | 
| Monthly Downloads: | 2,092 | 
| Daily Downloads: | 3 | 
| Total Stars: | 72 | 
| Total Watchers: | 3 | 
| Total Forks: | 31 | 
| Total Open Issues: | 1 | 
A service made to provide, set up and use the library from influxdata influxdb-php in Laravel.
composer.json and execute on your terminal $ composer install
"require": {
    "tray-labs/laravel-influxdb": "*"
}
'providers' => [
//  ...
    TrayLabs\InfluxDB\Providers\ServiceProvider::class,
]
'aliases' => [
//  ...
    'InfluxDB' => TrayLabs\InfluxDB\Facades\InfluxDB::class,
]
INFLUXDB_HOST=localhost
INFLUXDB_PORT=8086
INFLUXDB_USER=some_user
INFLUXDB_PASSWORD=some_password
INFLUXDB_SSL=false
INFLUXDB_VERIFYSSL=false
INFLUXDB_TIMEOUT=0
INFLUXDB_DBNAME=some_database
php artisan vendor:publish
<?php
// executing a query will yield a resultset object
$result = InfluxDB::query('select * from test_metric LIMIT 5');
// get the points from the resultset yields an array
$points = $result->getPoints();
<?php
// create an array of points
$points = array(
    new InfluxDB\Point(
        'test_metric', // name of the measurement
        null, // the measurement value
        ['host' => 'server01', 'region' => 'us-west'], // optional tags
        ['cpucount' => 10], // optional additional fields
        time() // Time precision has to be set to seconds!
    ),
    new InfluxDB\Point(
        'test_metric', // name of the measurement
        null, // the measurement value
        ['host' => 'server01', 'region' => 'us-west'], // optional tags
        ['cpucount' => 10], // optional additional fields
        time() // Time precision has to be set to seconds!
    )
);
$result = InfluxDB::writePoints($points, \InfluxDB\Database::PRECISION_SECONDS);
This project is licensed under the MIT License