Skip to content

Commit 1454693

Browse files
committed
readme
1 parent 17b18e8 commit 1454693

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PowerDataHub\Laraflux\ServiceProvider::class
2727
```
2828
'aliases' => [
2929
// ...
30-
'InfluxDB' => PowerDataHub\Laraflux\Facades\InfluxDB::class,
30+
'Laraflux' => PowerDataHub\Laraflux\Facades\Laraflux::class,
3131
]
3232
```
3333

@@ -56,7 +56,7 @@ php artisan vendor:publish
5656
<?php
5757

5858
// 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');
6060

6161
// get the points from the resultset yields an array
6262
$points = $result->getPoints();
@@ -68,24 +68,24 @@ $points = $result->getPoints();
6868
<?php
6969

7070
// create an array of points
71-
$points = array(
72-
new InfluxDB\Point(
71+
$points = [
72+
new \InfluxDB\Point(
7373
'test_metric', // name of the measurement
7474
null, // the measurement value
7575
['host' => 'server01', 'region' => 'us-west'], // optional tags
7676
['cpucount' => 10], // optional additional fields
7777
time() // Time precision has to be set to seconds!
7878
),
79-
new InfluxDB\Point(
79+
new \InfluxDB\Point(
8080
'test_metric', // name of the measurement
8181
null, // the measurement value
8282
['host' => 'server01', 'region' => 'us-west'], // optional tags
8383
['cpucount' => 10], // optional additional fields
8484
time() // Time precision has to be set to seconds!
8585
)
86-
);
86+
];
8787

88-
$result = InfluxDB::writePoints($points, \InfluxDB\Database::PRECISION_SECONDS);
88+
$result = Laraflux::writePoints($points, \InfluxDB\Database::PRECISION_SECONDS);
8989
```
9090

9191
License

0 commit comments

Comments
 (0)