@@ -27,7 +27,7 @@ PowerDataHub\Laraflux\ServiceProvider::class
27
27
```
28
28
'aliases' => [
29
29
// ...
30
- 'InfluxDB ' => PowerDataHub\Laraflux\Facades\InfluxDB ::class,
30
+ 'Laraflux ' => PowerDataHub\Laraflux\Facades\Laraflux ::class,
31
31
]
32
32
```
33
33
@@ -56,7 +56,7 @@ php artisan vendor:publish
56
56
<?php
57
57
58
58
// executing a query will yield a resultset object
59
- $result = InfluxDB ::query('select * from test_metric LIMIT 5');
59
+ $result = Laraflux ::query('select * from test_metric LIMIT 5');
60
60
61
61
// get the points from the resultset yields an array
62
62
$points = $result->getPoints();
@@ -68,24 +68,24 @@ $points = $result->getPoints();
68
68
<?php
69
69
70
70
// create an array of points
71
- $points = array(
72
- new InfluxDB\Point(
71
+ $points = [
72
+ new \ InfluxDB\Point(
73
73
'test_metric', // name of the measurement
74
74
null, // the measurement value
75
75
['host' => 'server01', 'region' => 'us-west'], // optional tags
76
76
['cpucount' => 10], // optional additional fields
77
77
time() // Time precision has to be set to seconds!
78
78
),
79
- new InfluxDB\Point(
79
+ new \ InfluxDB\Point(
80
80
'test_metric', // name of the measurement
81
81
null, // the measurement value
82
82
['host' => 'server01', 'region' => 'us-west'], // optional tags
83
83
['cpucount' => 10], // optional additional fields
84
84
time() // Time precision has to be set to seconds!
85
85
)
86
- ) ;
86
+ ] ;
87
87
88
- $result = InfluxDB ::writePoints($points, \InfluxDB\Database::PRECISION_SECONDS);
88
+ $result = Laraflux ::writePoints($points, \InfluxDB\Database::PRECISION_SECONDS);
89
89
```
90
90
91
91
License
0 commit comments