PHPackages                             modis/laravel-influxdb - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. modis/laravel-influxdb

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

modis/laravel-influxdb
======================

A service made to provide, set up and use the library from influxdata influxphp in Laravel.

1.2(5y ago)128MITPHP

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/alemodis/InfluxDB-Laravel)[ Packagist](https://packagist.org/packages/modis/laravel-influxdb)[ RSS](/packages/modis-laravel-influxdb/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Laravel Influxdb
================

[](#laravel-influxdb)

A service made to provide, set up and use the library from influxdata [influxdb-php](https://github.com/influxdata/influxdb-php/) in Laravel.

Installing
----------

[](#installing)

- Install by composer command:

```
composer require modis/laravel-influxdb
```

- Or add this line to require section of `composer.json` and execute on your terminal `$ composer install`

```
"require": {
    "modis/laravel-influxdb": "^1.2"
}
```

This package use auto-discover, if using less than version laravel 5.5 you must use below settings
--------------------------------------------------------------------------------------------------

[](#this-package-use-auto-discover-if-using-less-than-version-laravel-55-you-must-use-below-settings)

- Add this lines to yours config/app.php (Use only with Laravel version less than 5.5 )

```
'providers' => [
//  ...
    Modis\InfluxDB\Providers\ServiceProvider::class,
]
```

```
'aliases' => [
//  ...
    'InfluxDB' => Modis\InfluxDB\Facades\InfluxDB::class,
]
```

- Define env variables to connect to InfluxDB

```
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
INFLUXDB_UDP_ENABLED=false # Activate UDP
INFLUXDB_UDP_PORT=4444 # Port for UDP
```

- Write this into your terminal inside your project

```
php artisan vendor:publish
```

Reading Data
------------

[](#reading-data)

```
